Skip to content

should escape control characters #21

@hmh

Description

@hmh

Although the code is capable of escaping a few control characters, it is not checking for them before it decides whether output should be escaped or not (Unicode codepoints 0000h to 001fh), so they make it to the output as-is (unquoted).

To test, add \u000a to the value of any of the unquoted fields in the example.

Fixing this would be extremely trivial and the slowdown should be negligible (unlike, say, really fixing it for all Unicode control characters).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions