From: Roan Kattouw Date: Wed, 13 Jul 2011 00:27:40 +0000 (+0000) Subject: Use wfUrlProtocols() in ApiFormatBase instead of simply imploding $wgUrlProtocols... X-Git-Tag: 1.31.0-rc.0~28885 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/rappels.php?a=commitdiff_plain;h=80279c76a9328038e6a1c249f8f6a4a3060928e1;p=lhc%2Fweb%2Fwiklou.git Use wfUrlProtocols() in ApiFormatBase instead of simply imploding $wgUrlProtocols and expecting that to work --- diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index 2d283b0301..cddfb4aa54 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -265,7 +265,7 @@ See complete documentation, or // encode all comments or tags as safe blue strings $text = preg_replace( '/\<(!--.*?--|.*?)\>/', '<\1>', $text ); // identify URLs - $protos = implode( "|", $wgUrlProtocols ); + $protos = wfUrlProtocols(); // This regex hacks around bug 13218 (" included in the URL) $text = preg_replace( "#(($protos).*?)(")?([ \\'\"<>\n]|<|>|")#", '\\1\\3\\4', $text ); // identify requests to api.php