r42337 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42336‎ | r42337 | r42338 >
Date:16:32, 22 October 2008
Author:ialex
Status:old (Comments)
Tags:
Comment:
force string so that it doesn't output invalid XHTML when $value is null
Modified paths:
  • /trunk/extensions/CodeReview/CodeRevisionListView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeRevisionListView.php
@@ -138,7 +138,7 @@
139139 case 'COUNT(cc_rev_id)':
140140 return intval( $value );
141141 case 'cr_path':
142 - return Xml::element('div', array( 'title' => htmlspecialchars( $value ) ), $wgLang->truncate( $value, 30, '...' ));
 142+ return Xml::element('div', array( 'title' => htmlspecialchars( (string)$value ) ), $wgLang->truncate( (string)$value, 30, '...' ));
143143 }
144144 }
145145

Follow-up revisions

RevisionCommit summaryAuthorDate
r42388Fix for r42337 -- double-escapingbrion19:02, 23 October 2008

Comments

#Comment by Simetrical (talk | contribs)   14:57, 23 October 2008

Isn't this double-escaping $value? It should be array( 'title' => $value ), surely. (Or maybe array( 'title' => (string)$value ).)

#Comment by Brion VIBBER (talk | contribs)   19:02, 23 October 2008

Quite so! Fixed in r42388

Status & tagging log