r111429 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111428‎ | r111429 | r111430 >
Date:22:39, 13 February 2012
Author:werdna
Status:ok
Tags:needs-js-test 
Comment:
Modification to jquery.localize.js: For HTML elements, allow a raw="" parameter, which prevents escaping. Reviewed by Trevor before I committed it.
Modified paths:
  • /trunk/phase3/resources/jquery/jquery.localize.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/jquery.localize.js
@@ -45,8 +45,15 @@
4646 .find( 'msg,html\\:msg' )
4747 .each( function() {
4848 var $el = $(this);
 49+ var msgText = msg( $el.attr( 'key' ) );
 50+
 51+ if ( $el.attr('raw') ) {
 52+ $el.html(msgText);
 53+ } else {
 54+ $el.text(msgText);
 55+ }
 56+
4957 $el
50 - .text( msg( $el.attr( 'key' ) ) )
5158 .replaceWith( $el.html() );
5259 } )
5360 .end()

Status & tagging log