r-lib / commonmark

High Performance CommonMark and Github Markdown Rendering in R
https://docs.ropensci.org/commonmark/
Other
88 stars 11 forks source link

Escape characters in input #14

Open jeroen opened 3 years ago

jeroen commented 3 years ago

A \033 character is passed down verbatim, which breaks the xml parser:

xml2::read_xml(commonmark::markdown_xml("\033"))
## Error in read_xml.raw(charToRaw(enc2utf8(x)), "UTF-8", ..., as_html = as_html,  : 
##   PCDATA invalid Char value 27 [9]

Due to