Last active
February 16, 2018 13:37
-
-
Save WebReflection/646de480b2bc140aef22d5520bcfc054 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(JSON.stringify('\u2028').length<4)JSON.stringify=function(s,r,f){return function() {return s.apply(null,arguments).replace(r,f)}}(JSON.stringify,/\u2028|\u2029/g,function(c){return'\u2028'==c?'\\u2028':'\\u2029'}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Above code patches the infamous \u2028 and \u2029 bug