Use wfUrlProtocols() in ApiFormatBase instead of simply imploding $wgUrlProtocols...
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 13 Jul 2011 00:27:40 +0000 (00:27 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 13 Jul 2011 00:27:40 +0000 (00:27 +0000)
includes/api/ApiFormatBase.php

index 2d283b0..cddfb4a 100644 (file)
@@ -265,7 +265,7 @@ See <a href='http://www.mediawiki.org/wiki/API'>complete documentation</a>, or
                // encode all comments or tags as safe blue strings
                $text = preg_replace( '/\&lt;(!--.*?--|.*?)\&gt;/', '<span style="color:blue;">&lt;\1&gt;</span>', $text );
                // identify URLs
-               $protos = implode( "|", $wgUrlProtocols );
+               $protos = wfUrlProtocols();
                // This regex hacks around bug 13218 (&quot; included in the URL)
                $text = preg_replace( "#(($protos).*?)(&quot;)?([ \\'\"<>\n]|&lt;|&gt;|&quot;)#", '<a href="\\1">\\1</a>\\3\\4', $text );
                // identify requests to api.php