Fix #14459: Use jQuery.parseJSON instead of JSON.parse

This commit is contained in:
Richard Gibson
2013-10-28 11:35:53 -04:00
parent 95d1192d53
commit ced9d155f0
2 changed files with 3 additions and 13 deletions

View File

@@ -36,7 +36,7 @@ function dataAttr( elem, key, data ) {
data === "null" ? null :
// Only convert to a number if it doesn't change the string
+data + "" === data ? +data :
rbrace.test( data ) ? JSON.parse( data ) :
rbrace.test( data ) ? jQuery.parseJSON( data ) :
data;
} catch( e ) {}