alters behaviour for escaped noncharacters in extended plane with loose_unicode enabled, now replaced by single u+fffd, not two

This commit is contained in:
alisdair sullivan 2011-07-28 21:21:08 -07:00
parent 16c29a0070
commit b73ca00892
2 changed files with 2 additions and 2 deletions

View file

@ -709,7 +709,7 @@ low_surrogate(<<D/?utfx, Rest/binary>>, Stack, Opts, String, [C, B, A], High)
string(Rest, string(Rest,
Stack, Stack,
Opts, Opts,
<<String/binary, 16#fffd/utf8, 16#fffd/utf8>> <<String/binary, 16#fffd/utf8>>
) )
; false -> ; false ->
{error, {badjson, <<D/?utfx, Rest/binary>>}} {error, {badjson, <<D/?utfx, Rest/binary>>}}

View file

@ -1,4 +1,4 @@
{name, "escaped noncharacter (extended)"}. {name, "escaped noncharacter (extended)"}.
{jsx, [{string, <<16#fffd/utf8, 16#fffd/utf8>>}, end_json]}. {jsx, [{string, <<16#fffd/utf8>>}, end_json]}.
{json, "escaped_noncharacter_ext.json"}. {json, "escaped_noncharacter_ext.json"}.
{jsx_flags, [loose_unicode]}. {jsx_flags, [loose_unicode]}.