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

This commit is contained in:
John Resig 2009-02-09 15:35:33 +00:00
parent b16da9d762
commit 6b938e1c16

View file

@ -627,9 +627,7 @@ jQuery.extend({
// Evalulates a script in a global context // Evalulates a script in a global context
globalEval: function( data ) { globalEval: function( data ) {
data = jQuery.trim( data ); if ( data && /\S/.test(data) ) {
if ( data ) {
// Inspired by code by Andrea Giammarchi // Inspired by code by Andrea Giammarchi
// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
var head = document.getElementsByTagName("head")[0] || document.documentElement, var head = document.getElementsByTagName("head")[0] || document.documentElement,