We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b16da9d commit 6b938e1Copy full SHA for 6b938e1
src/core.js
@@ -627,9 +627,7 @@ jQuery.extend({
627
628
// Evalulates a script in a global context
629
globalEval: function( data ) {
630
- data = jQuery.trim( data );
631
-
632
- if ( data ) {
+ if ( data && /\S/.test(data) ) {
633
// Inspired by code by Andrea Giammarchi
634
// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
635
var head = document.getElementsByTagName("head")[0] || document.documentElement,
0 commit comments