git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b16da9d
)
Removed use of .trim() in globalEval, fixes #4036.
author
John Resig
<jeresig@gmail.com>
Mon, 9 Feb 2009 15:35:33 +0000
(15:35 +0000)
committer
John Resig
<jeresig@gmail.com>
Mon, 9 Feb 2009 15:35:33 +0000
(15:35 +0000)
src/core.js
patch
|
blob
|
history
diff --git
a/src/core.js
b/src/core.js
index
ebad0c1
..
3f6c1f7
100644
(file)
--- a/
src/core.js
+++ b/
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,