Fix escaper implementation to account for to_json forcing unicode characters to 7-bit clean.