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 @@
46
46
.find( 'msg,html\\:msg' )
47
47
.each( function() {
48
48
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
+
49
57
$el
50
- .text( msg( $el.attr( 'key' ) ) )
51
58
.replaceWith( $el.html() );
52
59
} )
53
60
.end()
Status & tagging log
23:52, 15 February 2012
Trevor Parscal (WMF)
(
talk
|
contribs
)
changed the
tags
for r111429
[
removed:
trevor]
23:52, 15 February 2012
Trevor Parscal (WMF)
(
talk
|
contribs
)
changed the
status
of r111429
[
removed:
new
added:
ok]
10:59, 15 February 2012
Hashar
(
talk
|
contribs
)
changed the
tags
for r111429
[
added:
needs-js-test]
10:58, 15 February 2012
Hashar
(
talk
|
contribs
)
changed the
tags
for r111429
[
added:
trevor]