From 80279c76a9328038e6a1c249f8f6a4a3060928e1 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 13 Jul 2011 00:27:40 +0000 Subject: [PATCH] Use wfUrlProtocols() in ApiFormatBase instead of simply imploding $wgUrlProtocols and expecting that to work --- includes/api/ApiFormatBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.20.1