// checked="checked" or checked
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
rscriptType = /\/(java|ecma)script/i,
- rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
+ rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,
wrapMap = {
option: [ 1, "<select multiple='multiple'>", "</select>" ],
legend: [ 1, "<fieldset>", "</fieldset>" ],
--- /dev/null
+<script>
+<!--
+ok( true, "script within html comments executed" );
+-->
+</script>
+<script>
+<![CDATA[
+ok( true, "script within CDATA executed" );
+]]>
+</script>
});
});
+test( "jQuery.domManip - script in comments are properly evaluated (#11402)", function() {
+ expect( 2 );
+ stop();
+ jQuery( "#qunit-fixture" ).load( "data/cleanScript.html", function() {
+ start();
+ });
+});
+
test("jQuery.ajax - active counter", function() {
ok( jQuery.active == 0, "ajax active counter should be zero: " + jQuery.active );
});