Skip to content

best practices for encoding control characters? #164

@michaelglass

Description

@michaelglass

When encoding terminal output that includes control characters (e.g. ESC) into XML, renderText produces valid utf-8 that's invalid XML.

Is there some established way of handling this case? If not, If I were to make a PR to make renderText more resilient to this, what would be the preferred direction?

  • escaping the chars somehow
  • filtering them out
  • wrapping them in CDATA (is this valid? I'm not really an XML pro)
  • throwing / returning an either

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions