http://www.mediawiki.org/wiki/Special:Code/MediaWiki/68272

Revision: 68272
Author:   hartman
Date:     2010-06-19 13:40:05 +0000 (Sat, 19 Jun 2010)

Log Message:
-----------
The rendering of autosummary in History and Diff pages did not properly escape 
the URI fragment before creating the link.
This was causing inconsistencies between anchors in editsummaries and those 
actually used in pages.
See also bug 18431

Modified Paths:
--------------
    trunk/phase3/RELEASE-NOTES
    trunk/phase3/includes/Linker.php

Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES  2010-06-19 12:55:41 UTC (rev 68271)
+++ trunk/phase3/RELEASE-NOTES  2010-06-19 13:40:05 UTC (rev 68272)
@@ -202,6 +202,7 @@
   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.

Modified: trunk/phase3/includes/Linker.php
===================================================================
--- trunk/phase3/includes/Linker.php    2010-06-19 12:55:41 UTC (rev 68271)
+++ trunk/phase3/includes/Linker.php    2010-06-19 13:40:05 UTC (rev 68272)
@@ -1026,6 +1026,9 @@
                        $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 {



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to