Commit 6b938e1c authored by John Resig's avatar John Resig

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

parent b16da9d7
...@@ -627,9 +627,7 @@ jQuery.extend({ ...@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment