Created
February 9, 2016 02:50
-
-
Save alexdiliberto/a4741a4cfc6f4d14720e to your computer and use it in GitHub Desktop.
Fix dat jQuery doe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove jQuery's ability to evaluate code in a global context | |
// When you go from text -> script, do not execute eval() | |
// Taken from: https://www.youtube.com/watch?v=vD4G358rEUY&index=8&list=PL4eq2DPpyBbk5hPbX1kSoIpPspYKoeC5V | |
$.globalEval = function() {}; | |
$.ajaxSetup({ | |
converters: { | |
'text script': text => text | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment