Temporarily reverting change Ifbeae7e9 for 2 weeks to allow time to
authorKaldari <rkaldari@wikimedia.org>
Fri, 15 Feb 2013 21:19:53 +0000 (13:19 -0800)
committerKaldari <rkaldari@wikimedia.org>
Fri, 15 Feb 2013 21:31:54 +0000 (13:31 -0800)
fix issues with TimedMediaHandler and other extensions.

This will temporarily allow HTML in JS i18n strings again.

See related bugs 44977, 44525, 44885, 43512

OKed by Krinkle.

Change-Id: Iedb304f80b79bb65b9080909a1d70d432ee8aa5d

resources/mediawiki/mediawiki.jqueryMsg.js
tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js

index 183b525..76f0259 100644 (file)
                                                $span.append( childNode );
                                        } );
                                } else {
-                                       // Let jQuery append nodes, arrays of nodes and jQuery objects
-                                       // other things (strings, numbers, ..) are appended as text nodes (not as HTML strings)
-                                       $span.append( $.type( node ) === 'object' ? node : document.createTextNode( node ) );
+                                       // strings, integers, anything else
+                                       // (will soon switch to createTextNode() for non-objects)
+                                       $span.append( node );
                                }
                        } );
                        return $span;
index 388f399..c61365e 100644 (file)
@@ -90,6 +90,7 @@
                assert.equal( parser( 'simple', 'bar' ), 'Foo bar baz $2', 'Replacements with less substitutes' );
                assert.equal( parser( 'simple', 'bar', 'quux' ), 'Foo bar baz quux', 'Replacements with all substitutes' );
 
+               /* Temporarily disabling until 2013-03 --Kaldari
                mw.messages.set( 'plain-input', '<foo foo="foo">x$1y&lt;</foo>z' );
 
                assert.equal(
                        'Foo &lt;bar bar="bar"&gt;&amp;gt;&lt;/bar&gt;',
                        'Replacement is not considered html'
                );
+               */
 
                mw.messages.set( 'object-replace', 'Foo $1' );