r68272 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68271‎ | r68272 | r68273 >
Date:13:40, 19 June 2010
Author:hartman
Status:reverted (Comments)
Tags:
Comment:
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 (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -1026,6 +1026,9 @@
10271027 $section = str_replace( '[[:', '', $section );
10281028 $section = str_replace( '[[', '', $section );
10291029 $section = str_replace( ']]', '', $section );
 1030+
 1031+ # Most of Title:: expects fragments to be escaped
 1032+ $section = Title::escapeFragmentForURL( $section );
10301033 if ( $local ) {
10311034 $sectionTitle = Title::newFromText( '#' . $section );
10321035 } else {
Index: trunk/phase3/RELEASE-NOTES
@@ -202,6 +202,7 @@
203203 a fatal error
204204 * (bug 23465) Don't ignore the predefined destination filename on
205205 Special:Upload after following a red link
 206+* Correct the escaping of the autosummary URI fragments.
206207
207208 === API changes in 1.17 ===
208209 * (bug 22738) Allow filtering by action type on query=logevent.

Follow-up revisions

RevisionCommit summaryAuthorDate
r68342(bug 17857) Make {{anchorencode}} work in a manner more similar to the way that...conrad23:43, 20 June 2010
r68358(bug 18431) Remove initial whitespace from fragment in Title::secureAndSplit()conrad14:08, 21 June 2010
r74824Revert RELEASE-NOTES change from r68272, which was reverted in r68343.platonides23:02, 15 October 2010

Comments

#Comment by Conrad.Irwin (talk | contribs)   01:07, 20 June 2010

This only causes fragments to be double encoded. (while escapeId's is currently idempotent, it seems to be a strange thing to do)

#Comment by Conrad.Irwin (talk | contribs)   01:58, 21 June 2010

The code change was reverted in r68343, marking this revision as OK, and comments can go there.

#Comment by Platonides (talk | contribs)   23:01, 15 October 2010

The code being reverted doesn't make the revision ok, but reverted

#Comment by Conrad.Irwin (talk | contribs)   23:04, 15 October 2010

Thanks for cleaning up the mess. I'll remember for next time.

#Comment by Platonides (talk | contribs)   23:17, 15 October 2010

No problem :)

Status & tagging log