Open Legimet opened 1 month ago
Any XML file with Unicode in a CDATA section produces a malformed TNS file. Example:
<?xml version="1.0" encoding="UTF-8" ?><prob xmlns="urn:TI.Problem" ver="1.0" pbname=""><sym></sym><card clay="0" h1="10000" h2="10000" w1="10000" w2="10000"><isDummyCard>0</isDummyCard><flag>0</flag><wdgt xmlns:sc="urn:TI.ScriptApp" type="TI.ScriptApp" ver="1.0"><sc:mFlags>0</sc:mFlags><sc:value>-1</sc:value><sc:script version="512" id="0"><![CDATA[function on.paint(gc) gc:drawString("Hello World ✓", 5, 20) end ]]></sc:script></wdgt></card></prob>
The solution is for escape_unicode to skip all CDATA sections.
escape_unicode
So this is fixed by #27 as well, right?
No, not yet. That PR just handles Lua.
Any XML file with Unicode in a CDATA section produces a malformed TNS file. Example:
The solution is for
escape_unicode
to skip all CDATA sections.