From: Roan Kattouw Date: Fri, 27 Feb 2009 19:36:34 +0000 (+0000) Subject: API: Fix autolinker bug reported by DannyB on IRC: > was included in the URL X-Git-Tag: 1.31.0-rc.0~42659 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=99c28aae2239a0300a2c7cd57454242298935952;p=lhc%2Fweb%2Fwiklou.git API: Fix autolinker bug reported by DannyB on IRC: > was included in the URL --- diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index deab8e3021..df8c28e7df 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -219,7 +219,7 @@ See complete documentation, or // identify URLs $protos = implode("|", $wgUrlProtocols); # This regex hacks around bug 13218 (" included in the URL) - $text = preg_replace("#(($protos).*?)(")?([ \\'\"<\n])#", '\\1\\3\\4', $text); + $text = preg_replace("#(($protos).*?)(")?([ \\'\"<>\n]|<|>|")#", '\\1\\3\\4', $text); // identify requests to api.php $text = preg_replace("#api\\.php\\?[^ \\()<\n\t]+#", '\\0', $text); if( $this->mHelp ) {