r110399 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110398‎ | r110399 | r110400 >
Date:16:21, 31 January 2012
Author:gregchiasson
Status:resolved (Comments)
Tags:aft 
Comment:
AFT5 fix double-escaping from r110301 and r110012
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php
@@ -604,7 +604,7 @@
605605 'class' => 'articleFeedbackv5-comment-short',
606606 'id' => "articleFeedbackv5-comment-short-$feedbackId"
607607 ),
608 - htmlspecialchars( $short )
 608+ $short
609609 );
610610
611611 // If the short string is the same size as the
@@ -617,12 +617,12 @@
618618 'class' => 'articleFeedbackv5-comment-full',
619619 'id' => "articleFeedbackv5-comment-full-$feedbackId"
620620 ),
621 - htmlspecialchars( $text )
 621+ $text
622622 )
623623 . Html::element( 'a', array(
624624 'class' => 'articleFeedbackv5-comment-toggle',
625625 'id' => "articleFeedbackv5-comment-toggle-$feedbackId"
626 - ), wfMessage( 'articlefeedbackv5-comment-more' )->escaped() );
 626+ ), wfMessage( 'articlefeedbackv5-comment-more' ) );
627627 }
628628
629629 $rv .= Html::closeElement( 'blockquote' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r110415AFT5 - convert more link to text, per comments on r110399gregchiasson18:50, 31 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r110012AFT5 feedback page - add truncation to comments over 500 characters, with exp...gregchiasson18:43, 25 January 2012
r110301AFT5 - re-commenting out the AFT5 special page calls, because those keep gett...gregchiasson16:26, 30 January 2012

Comments

#Comment by Nikerabbit (talk | contribs)   17:36, 31 January 2012

wfMessage() without output call defaults to parsing, which leads to double escaping. Should always call one of text, escaped, parse, parseAsBlock - in this case text().

Status & tagging log