Skip to content
Permalink
Browse files

Removed use of .trim() in globalEval, fixes #4036.

  • Loading branch information
jeresig committed Feb 9, 2009
1 parent b16da9d commit 6b938e1c162877ee62681f8aefe6f64ba208eead
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/core.js
@@ -627,9 +627,7 @@ jQuery.extend({

// Evalulates a script in a global context
globalEval: function( data ) {
data = jQuery.trim( data );

if ( data ) {
if ( data && /\S/.test(data) ) {
// Inspired by code by Andrea Giammarchi
// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
var head = document.getElementsByTagName("head")[0] || document.documentElement,

0 comments on commit 6b938e1

Please sign in to comment.
You can’t perform that action at this time.