Skip to content

Commit

Permalink
better handling of non-ASCII characters
Browse files Browse the repository at this point in the history
Fixes micha#44
  • Loading branch information
shrx committed Dec 2, 2015
1 parent 5a14c4a commit 280452a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsawk
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
};
window.json = function() {
try {
return JSON.stringify.apply(window, arguments);
return decodeURIComponent(escape(JSON.stringify.apply(window, arguments)));
} catch (e) {
err("jsawk: JSON stringify error: "+e);
quit(5);
Expand Down

0 comments on commit 280452a

Please sign in to comment.