diff --git a/src/manipulation.js b/src/manipulation.js index f86bd9ab0..19c60fcbc 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -25,9 +25,7 @@ var // Support: IE <=10 - 11+ // In IE using regex groups here causes severe slowdowns. - rnoInnerhtml = /\s*$/g; + rnoInnerhtml = / diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 131109448..8262516a9 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -2233,13 +2233,14 @@ QUnit.test( "domManip executes scripts containing html comments or CDATA (trac-9 "" ].join( "\n" ) ).appendTo( "#qunit-fixture" ); - jQuery( [ - "" - ].join( "\n" ) ).appendTo( "#qunit-fixture" ); + // This test requires XHTML mode as CDATA is not recognized in HTML. + // jQuery( [ + // "" + // ].join( "\n" ) ).appendTo( "#qunit-fixture" ); jQuery( [ "" ].join( "\n" ) ).appendTo( "#qunit-fixture" ); + + // ES2015 in Annex B requires HTML-style comment delimiters (``) to act as + // single-line comment delimiters; i.e. they should be treated as `//`. + // See gh-4904 + jQuery( [ + "" + ].join( "\n" ) ).appendTo( "#qunit-fixture" ); } ); testIframe(