(bug 14140) URL-encoded page titles are now decoded in edit summaries
authorIlmari Karonen <vyznev@users.mediawiki.org>
Thu, 22 May 2008 20:02:03 +0000 (20:02 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Thu, 22 May 2008 20:02:03 +0000 (20:02 +0000)
RELEASE-NOTES
includes/Linker.php

index 9562a22..a199243 100644 (file)
@@ -357,6 +357,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Added iiprop=mime and aiprop=metadata
 * Handled unrecognized values for parameters more gracefully
 * Handled requesting disallowed tokens more gracefully
+* (bug 14140) URL-encoded page titles are now decoded in edit summaries
 
 === Languages updated in 1.13 ===
 
index f0cb675..29959ca 100644 (file)
@@ -1070,6 +1070,11 @@ class Linker {
 
                $comment = $match[0];
 
+               # fix up urlencoded title texts (copied from Parser::replaceInternalLinks)
+               if( strpos( $match[1], '%' ) !== false ) {
+                       $match[1] = str_replace( array('<', '>'), array('&lt;', '&gt;'), urldecode($match[1]) );
+               }
+
                # Handle link renaming [[foo|text]] will show link as "text"
                if( "" != $match[3] ) {
                        $text = $match[3];