Skip to content

Instantly share code, notes, and snippets.

@alexdiliberto
Created February 9, 2016 02:50
Show Gist options
  • Save alexdiliberto/a4741a4cfc6f4d14720e to your computer and use it in GitHub Desktop.
Save alexdiliberto/a4741a4cfc6f4d14720e to your computer and use it in GitHub Desktop.
Fix dat jQuery doe
// 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