diff options
Diffstat (limited to 'src/manipulation/_evalUrl.js')
-rw-r--r-- | src/manipulation/_evalUrl.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/manipulation/_evalUrl.js b/src/manipulation/_evalUrl.js index f9ec7027c..1ed033673 100644 --- a/src/manipulation/_evalUrl.js +++ b/src/manipulation/_evalUrl.js @@ -10,11 +10,16 @@ jQuery._evalUrl = function( url ) { // Make this explicit, since user can override this through ajaxSetup (#11264) type: "GET", - dataType: "script", + dataType: "text", cache: true, async: false, global: false, - "throws": true + "throws": true, + + // Only evaluate the response if it is successful (gh-4126) + success: function( text ) { + jQuery.globalEval( text ); + } } ); }; |