Commit graph

409 commits

Author SHA1 Message Date
alisdair sullivan
5f6d7c1f01 upon further consideration, ignoring bad \uuXXXX escape sequences could be dangerous, remove test 2012-03-29 00:18:53 -07:00
alisdair sullivan
867199539c add (failing) tests for bad escape sequences 2012-03-29 00:13:08 -07:00
alisdair sullivan
19e710da55 add dirty_strings option to bypass json escaping strings during encoding 2012-03-29 00:01:50 -07:00
alisdair sullivan
9d2448669e whitespace 2012-03-28 23:46:18 -07:00
alisdair sullivan
6544975379 add more comprehensive checking to json_escape 2012-03-28 23:46:06 -07:00
alisdair sullivan
dc6a026e94 add tests for bad utf sequences, fix failures 2012-03-28 23:31:07 -07:00
alisdair sullivan
2d2dd5f7c1 faster implementation of string cleaning 2012-03-28 21:51:21 -07:00
alisdair sullivan
7e243bafd1 remove tests for malformed 5 and 6 byte sequences 2012-03-28 21:23:35 -07:00
alisdair sullivan
edbe4d16ab fix clean string for bad utf8 2012-03-28 20:17:58 -07:00
alisdair sullivan
9bdbf7969b noncharacters work with incompletes now 2012-03-28 19:50:57 -07:00
alisdair sullivan
cf6dbd6480 properly guard noncharacters 2012-03-28 19:34:49 -07:00
alisdair sullivan
7a1bcc4992 bad utf sequences were being replaced with u+fffd per byte, they are now correctly replaced with just a single u+fffd codepoint 2012-03-27 23:18:06 -07:00
alisdair sullivan
d964d4b12f bump version to v1.1.1 2012-03-27 16:58:06 -07:00
alisdair sullivan
addb1e172d fix for failing tests on R14BXX 2012-03-27 16:56:12 -07:00
alisdair sullivan
bd6202e618 v1.1 2012-03-27 16:49:25 -07:00
alisdair sullivan
42d6ef2c21 refactor of encoded codepoints with looser string restrictions 2012-03-27 14:44:02 -07:00
alisdair sullivan
672fe04c37 additional noncharacter handling for R14BXX 2012-03-27 13:41:23 -07:00
alisdair sullivan
3d836f1241 remove debug statement from tests 2012-03-26 22:10:09 -07:00
alisdair sullivan
f1c4a85df1 loosen restrictions on allowed codepoints in strings 2012-03-26 19:39:28 -07:00
alisdair sullivan
3421b6546e rewrite of json_escape for efficiency 2012-03-26 19:28:53 -07:00
alisdair sullivan
04ea83266e slightly more efficient encoding of strings 2012-03-26 18:52:32 -07:00
alisdair sullivan
41002bd10f comment explaining weird string functions 2012-03-26 18:52:06 -07:00
alisdair sullivan
bc588ceb7b first step to better perf 2012-03-25 18:48:24 -07:00
alisdair sullivan
b57750fcfc fix specs for to_term/x, thanks to michael truog 2012-03-25 13:18:26 -07:00
alisdair sullivan
91dcb65e3c Merge https://github.com/okeuday/jsx into develop 2012-03-25 13:14:08 -07:00
alisdair sullivan
26acdc29ee bump to v1.0.2 2012-03-25 13:10:37 -07:00
alisdair sullivan
cff2ffa295 better specs for to_term/x, thanks to michael truog 2012-03-25 13:09:55 -07:00
Michael Truog
d560d7ff3a Fix -spec declaration to prevent dialyzer problems. 2012-03-25 00:26:12 -07:00
alisdair sullivan
5bc8bfdf45 encoder now only performs a single pass on strings and can optionally json encode them 2012-03-24 19:42:00 -07:00
alisdair sullivan
821a8ac06e integrate dmitry kolesnikov's changes to json_encode 2012-03-23 22:45:46 -07:00
alisdair sullivan
29d5c28196 Merge https://github.com/fogfish/jsx into develop 2012-03-23 18:19:00 -07:00
Dmitry Kolesnikov
5d12d6262f FIX: to_json performance + jsx benchmark 2012-03-22 21:13:20 +02:00
alisdair sullivan
978e75887a corrected handling of malformed utf8 sequences 2012-03-21 05:38:08 -07:00
alisdair sullivan
89fcdac86a whitelist allowed codepoints rather than blacklist disallowed codepoints in jsx_encoder 2012-03-21 05:38:07 -07:00
alisdair sullivan
7aab732346 remove export_all flag 2012-03-21 05:38:07 -07:00
alisdair sullivan
3a2b48db18 ok, now it's fixed for older releases 2012-03-21 05:38:07 -07:00
alisdair sullivan
7d99e64d31 finally found actual cause of otp r14x bug 2012-03-21 05:38:07 -07:00
alisdair sullivan
ad8f640aac remove rogue function head 2012-03-21 05:38:07 -07:00
alisdair sullivan
f991f7c42e fix for older erts that don't allow noncharacters 2012-03-21 05:38:07 -07:00
alisdair sullivan
7b2c34ccd2 fix for older erts versions where the private space reserved characters are not recognized 2012-03-21 05:38:07 -07:00
alisdair sullivan
11d2d0bae1 minor fixes for illegal utf8 sequences and better testing thereof 2012-03-21 05:37:33 -07:00
alisdair sullivan
036dd72ecf minor fixes for illegal utf8 sequences and better testing thereof 2012-03-21 05:37:33 -07:00
alisdair sullivan
0c04e485a3 fixes wrongheaded and stupid escaping of strings 2012-03-21 05:36:39 -07:00
alisdair sullivan
1870a74d76 apply loose_unicode option to decoder 2012-03-21 05:36:39 -07:00
alisdair sullivan
e36858d1ba apply escape_forward_slash option to decoding as well as encoding 2012-03-21 05:36:39 -07:00
alisdair sullivan
e3c883457f allow c and c++ style comments anywhere whitespace is legal 2012-03-21 05:36:39 -07:00
alisdair sullivan
d2950ab8c7 remove all ?_assert and replace with ?_assertFoo's 2012-03-21 05:36:39 -07:00
alisdair sullivan
aef1f71690 add 'no_jsonp_escapes' flag/option to not escape u+2028 and u+2029 2012-03-21 05:36:38 -07:00
alisdair sullivan
8dafdb32b3 escape strings and keys in the encoder 2012-03-21 05:36:38 -07:00
alisdair sullivan
97a7d295f1 the option single_quotes in functions dealing with json inputs now allows json that uses single quotes to deliminate keys and strings to be processed, note that this changes the escaping rules slightly 2012-03-21 05:35:16 -07:00