Skip to content

Output containing reserved characters isn't escaped allowing invalid JSON and XML #35

@brooksdavis

Description

@brooksdavis

Some code we were running that used libxo added single quote characters to a string that ended up in a value (via a few levels of indirection) and we were surprised to find that invalid XML was produced. It would be helpful if libxo did this for us or at a minimum least provided a simple vis(3) like function that did the escaping required for the current format mode.

In our case I ended up using a strsnvis() to blindly encode XML and JSON special 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