We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 044be81 + 8a339bf commit 44c45d8Copy full SHA for 44c45d8
src/Http/Url.php
@@ -636,6 +636,13 @@ private static function getSuffixes()
636
*/
637
private static function parse($url)
638
{
639
+ preg_match('/^(http|https)?\:\/\/([\w\.]+)wikipedia.org\/wiki\//', $url, $matches);
640
+ if (count($matches)) {
641
+ $wikiUrl = urldecode(trim(preg_replace('/^(http|https)?\:\/\/([\w\.]+)wikipedia.org\/wiki\//', '', $url)));
642
+ $encodeUrlWiki = urlencode($wikiUrl);
643
+ $url = $matches[0] . $encodeUrlWiki;
644
+ }
645
+
646
$enc_url = preg_replace_callback(
647
'%[^:/@?&=#]+%usD',
648
function ($matches) {
0 commit comments