unescape: utf8: do not read escaped newline
@@ -124,10 +124,11 @@ static int u8_read_escape_sequence(char *str, uint32_t *dest)
static inline int is_json_escape(char *c)
{
return (
- (*c == '\"') || // double-quote
- (*c == '\'') || // single-quote
- (*c == '\\') || // solidus
- (*c == '/') // reverse-solidus
+ (*c == '\"') || /* double-quote */
+ (*c == '\'') || /* single-quote */
+ (*c == '\\') || /* solidus */
+ (*c == 'n') || /* new-line */
+ (*c == '/') /* reverse-solidus */
);
}
