From 2e6fb0623e27a2d84df28c5d592b914a053088d9 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sat, 31 Jan 2009 13:05:12 +0000 Subject: [PATCH] API: (bug 17182) Fix pretty printer so URLs with parentheses in them are autolinked correctly --- RELEASE-NOTES | 4 +++- includes/api/ApiFormatBase.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 606087946c..a12e189ea5 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -1,4 +1,4 @@ - = MediaWiki release notes = += MediaWiki release notes = Security reminder: MediaWiki does not require PHP's register_globals setting since version 1.2.0. If you have it on, turn it *off* if you can. @@ -137,6 +137,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 16483) Kill filesort in ApiQueryBacklinks caused by missing parentheses. Building query properly now using makeList() * Add "check" parameter to action=email +* (bug 17182) Fix pretty printer so URLs with parentheses in them are + autolinked correctly === Languages updated in 1.15 === diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index 0c832aa368..f6c2bb2cba 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -209,7 +209,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 ) { -- 2.20.1