diff --git a/src/core/platform/web/jquery/_jquery.js b/src/core/platform/web/jquery/_jquery.js index 0c7f0479e..9888c50f7 100644 --- a/src/core/platform/web/jquery/_jquery.js +++ b/src/core/platform/web/jquery/_jquery.js @@ -10357,20 +10357,27 @@ function createStandardXHR() { try { return new window.XMLHttpRequest(); - } catch ( e ) {} + } catch (e) { + } } function createActiveXHR() { try { - return new window.ActiveXObject( "Microsoft.XMLHTTP" ); - } catch ( e ) {} + return new window.ActiveXObject("Microsoft.XMLHTTP"); + } catch (e) { + } } - +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) + jQuery.ajaxPrefilter(function (s) { + if (s.crossDomain) { + s.contents.script = false; + } + }); // Install script dataType - jQuery.ajaxSetup( { + jQuery.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, " + "application/ecmascript, application/x-ecmascript"