Skip to content
Permalink
Browse files

Manipulation: Restore _evalUrl jQuery.ajax calls to dataType: script

IE and iOS <10 XHR transport does not succeed on data: URIs
Ref gh-4243
Ref gh-4126
Closes gh-4258
  • Loading branch information...
gibson042 committed Dec 13, 2018
1 parent c2026b1 commit 13de7c9ede1c49c30344b4347985eac341484b1e
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/manipulation/_evalUrl.js
@@ -10,15 +10,19 @@ jQuery._evalUrl = function( url ) {

// Make this explicit, since user can override this through ajaxSetup (#11264)
type: "GET",
dataType: "text",
dataType: "script",
cache: true,
async: false,
global: false,
"throws": true,

// Only evaluate the response if it is successful (gh-4126)
success: function( text ) {
jQuery.globalEval( text );
// dataFilter is not invoked for failure responses, so using it instead
// of the default converter is kludgy but it works.
converters: {
"text script": function() {}
},
dataFilter: function( response ) {
jQuery.globalEval( response );
}
} );
};

0 comments on commit 13de7c9

Please sign in to comment.
You can’t perform that action at this time.