r51531 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51530‎ | r51531 | r51532 >
Date:06:52, 6 June 2009
Author:thomasv
Status:ok (Comments)
Tags:
Comment:
follow-up to r51135
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/ProofreadPage.php
@@ -666,7 +666,7 @@
667667 if( ! $index_title || ! $index_title->exists() )
668668 return '<strong class="error">' . wfMsgForContent( 'proofreadpage_nosuch_index' ) . '</strong>';
669669
670 - $out = '<span id="pr_index" class="hiddenStructure"><a href="'.$index_title->getFullUrl().'">'.$index_namespace.'</a> </span>';
 670+ $out = '<span id="pr_index" class="hiddenStructure"><a href="'.$index_title->escapeFullUrl().'">'.$index_namespace.'</a> </span>';
671671 list( $links, $params, $attributes ) = pr_parse_index( $index_title );
672672
673673 if( $params ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r51135Localisation updates for core messages from translatewiki.net (2009-05-28 18:...raymond19:15, 28 May 2009

Comments

#Comment by Tim Starling (talk | contribs)   14:49, 6 June 2009

Not sure what revision you mean, but it's still wrong. You want htmlspecialchars( $index_title->escapeLocalUrl() ). It has to be escaped once to go from text to URL, and again to go from URL to HTML. URLs have ampersands in them which need to be escaped.

#Comment by Tim Starling (talk | contribs)   15:25, 6 June 2009

Sorry ignore that. Forgot we had that function.

Status & tagging log