Make sure leading whitespace is trimmed for parseJSON. Fixes #6031.
This commit is contained in:
parent
8b86004f9c
commit
94d925cd46
2 changed files with 7 additions and 2 deletions
|
@ -480,6 +480,9 @@ jQuery.extend({
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue