From c32132b9bb73d21494df3f718741f04aad7c867b Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Mon, 13 Feb 2012 22:39:15 +0000 Subject: [PATCH] Modification to jquery.localize.js: For HTML elements, allow a raw="" parameter, which prevents escaping. Reviewed by Trevor before I committed it. --- resources/jquery/jquery.localize.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/resources/jquery/jquery.localize.js b/resources/jquery/jquery.localize.js index 3a7925bf53..42554e0b76 100644 --- a/resources/jquery/jquery.localize.js +++ b/resources/jquery/jquery.localize.js @@ -45,8 +45,15 @@ $.fn.localize = function( options ) { .find( 'msg,html\\:msg' ) .each( function() { var $el = $(this); + var msgText = msg( $el.attr( 'key' ) ); + + if ( $el.attr('raw') ) { + $el.html(msgText); + } else { + $el.text(msgText); + } + $el - .text( msg( $el.attr( 'key' ) ) ) .replaceWith( $el.html() ); } ) .end() -- 2.20.1