aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ajax/script.js')
-rw-r--r--src/ajax/script.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ajax/script.js b/src/ajax/script.js
index 4c810f0a0..d94177432 100644
--- a/src/ajax/script.js
+++ b/src/ajax/script.js
@@ -4,6 +4,13 @@ define( [
"../ajax"
], function( jQuery, document ) {
+// 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( {
accepts: {