If a valid surrogate character escape is found and the following byte sequence isn't a valid unicode escape sequence, insert our replacement character '?' as we would any other place we saw invalid characters while unescaping.
In general, this default case from this switch should be treated as seeing an invalid character in the sequence. So we should replace it with our replacement character instead of blowing up.
This fix should be applied upstream on yajl itself as well, but I'm starting here since that's where the original issue was reported and we have a patched yajl embedded anyway.
If a valid surrogate character escape is found and the following byte sequence isn't a valid unicode escape sequence, insert our replacement character '?' as we would any other place we saw invalid characters while unescaping.
In general, this default case from this switch should be treated as seeing an invalid character in the sequence. So we should replace it with our replacement character instead of blowing up.
This fix should be applied upstream on yajl itself as well, but I'm starting here since that's where the original issue was reported and we have a patched yajl embedded anyway.
Fixes #176