diff --git a/src/manipulation/_evalUrl.js b/src/manipulation/_evalUrl.js index 6704749ae..0fdacbcee 100644 --- a/src/manipulation/_evalUrl.js +++ b/src/manipulation/_evalUrl.js @@ -7,6 +7,7 @@ jQuery._evalUrl = function( url ) { url: url, type: "GET", dataType: "script", + cache: true, async: false, global: false, "throws": true diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index b9d59fc4d..ca3b8b548 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -2434,3 +2434,12 @@ test( "Validate creation of multiple quantities of certain elements (#13818)", 4 }); }); }); + +asyncTest( "Insert script with data-URI (gh-1887)", 1, function() { + Globals.register( "testFoo" ); + jQuery( "#qunit-fixture" ).append( "" ); + setTimeout(function() { + strictEqual( window[ "testFoo" ], "foo", "data-URI script executed" ); + start(); + }, 100 ); +});