git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure leading whitespace is trimmed for parseJSON. Fixes #6031.
[jquery.git]
/
src
/
core.js
diff --git
a/src/core.js
b/src/core.js
index
02d8269
..
9fa311d
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-480,6
+480,9
@@
jQuery.extend({
if ( typeof data !== "string" || !data ) {
return null;
}
if ( typeof data !== "string" || !data ) {
return null;
}
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js