The rendering of autosummary in History and Diff pages did not properly escape the...
authorDerk-Jan Hartman <hartman@users.mediawiki.org>
Sat, 19 Jun 2010 13:40:05 +0000 (13:40 +0000)
committerDerk-Jan Hartman <hartman@users.mediawiki.org>
Sat, 19 Jun 2010 13:40:05 +0000 (13:40 +0000)
This was causing inconsistencies between anchors in editsummaries and those actually used in pages.
See also bug 18431

RELEASE-NOTES
includes/Linker.php

index 965f800..e38f341 100644 (file)
@@ -202,6 +202,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   a fatal error
 * (bug 23465) Don't ignore the predefined destination filename on 
   Special:Upload after following a red link
+* Correct the escaping of the autosummary URI fragments.
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent.
index 79e417e..f6e45d1 100644 (file)
@@ -1026,6 +1026,9 @@ class Linker {
                        $section = str_replace( '[[:', '', $section );
                        $section = str_replace( '[[', '', $section );
                        $section = str_replace( ']]', '', $section );
+
+                       # Most of Title:: expects fragments to be escaped
+                       $section = Title::escapeFragmentForURL( $section );
                        if ( $local ) {
                                $sectionTitle = Title::newFromText( '#' . $section );
                        } else {