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