r112526 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112525‎ | r112526 | r112527 >
Date:21:52, 27 February 2012
Author:brion
Status:ok
Tags:
Comment:
Revert r110045: well-meaning but broken attempt to apply preemptive XSS protection on messages

This caused bug 34708: broke usage examples in WikiEditor which include <a href> or <img> tags as-is, which is perfectly legit HTML.
Modified paths:
  • /trunk/phase3/includes/MessageBlobStore.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/MessageBlobStore.php
@@ -350,12 +350,7 @@
351351 $messages = array();
352352
353353 foreach ( $module->getMessages() as $key ) {
354 - $messages[$key] =
355 - Sanitizer::normalizeCharReferences(
356 - Sanitizer::removeHTMLtags(
357 - wfMsgExt( $key, array( 'language' => $lang ) )
358 - )
359 - );
 354+ $messages[$key] = wfMsgExt( $key, array( 'language' => $lang ) );
360355 }
361356
362357 return FormatJson::encode( (object)$messages );

Follow-up revisions

RevisionCommit summaryAuthorDate
r112536MFT r112526reedy22:49, 27 February 2012
r112647MFT r112384, r112400, r112408, r112451, r112456, r112474, r112526, r112533, r...reedy21:21, 28 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r110045sanitize outgoing messagesneilk02:15, 26 January 2012

Status & tagging log