cmark_utf8proc_encode_char was pasted from an old version of the utf8proc project and, for whatever reason, contains special handling of U+FFFE and U+FFFF, resulting in invalid serialization of these codepoints. This can be triggered when parsing numeric character references and with some renderers:
cmark_utf8proc_encode_char
was pasted from an old version of the utf8proc project and, for whatever reason, contains special handling of U+FFFE and U+FFFF, resulting in invalid serialization of these codepoints. This can be triggered when parsing numeric character references and with some renderers:The expected UTF-8 sequence is EF BF BF.