mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 16:24:57 -05:00
Fix #14459: Use jQuery.parseJSON instead of JSON.parse
This commit is contained in:
@@ -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 ) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user