https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112526

Revision: 112526
Author:   brion
Date:     2012-02-27 21:52:33 +0000 (Mon, 27 Feb 2012)
Log Message:
-----------
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: trunk/phase3/includes/MessageBlobStore.php
===================================================================
--- trunk/phase3/includes/MessageBlobStore.php  2012-02-27 21:52:13 UTC (rev 
112525)
+++ trunk/phase3/includes/MessageBlobStore.php  2012-02-27 21:52:33 UTC (rev 
112526)
@@ -350,12 +350,7 @@
                $messages = array();
 
                foreach ( $module->getMessages() as $key ) {
-                       $messages[$key] =
-                               Sanitizer::normalizeCharReferences(
-                                       Sanitizer::removeHTMLtags(
-                                               wfMsgExt( $key, array( 
'language' => $lang ) )
-                                       )
-                               );
+                       $messages[$key] = wfMsgExt( $key, array( 'language' => 
$lang ) );
                }
 
                return FormatJson::encode( (object)$messages );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to