() are valid in URLs, not sure why we're using them as a finishing point in ApiFormatBase
authorSam Reed <reedy@users.mediawiki.org>
Fri, 13 Jan 2012 21:42:31 +0000 (21:42 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Fri, 13 Jan 2012 21:42:31 +0000 (21:42 +0000)
Fixes fixme on r95572 as urls are now complete with () in them

includes/api/ApiFormatBase.php

index 6747632..543c90c 100644 (file)
@@ -264,7 +264,7 @@ See <a href='https://www.mediawiki.org/wiki/API'>complete documentation</a>, or
                // 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
                // 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
-               $text = preg_replace( "#api\\.php\\?[^ \\()<\n\t]+#", '<a href="\\0">\\0</a>', $text );
+               $text = preg_replace( "#api\\.php\\?[^ <\n\t]+#", '<a href="\\0">\\0</a>', $text );
                if ( $this->mHelp ) {
                        // make strings inside * bold
                        $text = preg_replace( "#\\*[^<>\n]+\\*#", '<b>\\0</b>', $text );
                if ( $this->mHelp ) {
                        // make strings inside * bold
                        $text = preg_replace( "#\\*[^<>\n]+\\*#", '<b>\\0</b>', $text );