Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Luna should skip CDATA sections when escaping Unicode #28

Open
Legimet opened this issue Jul 9, 2024 · 2 comments
Open

Luna should skip CDATA sections when escaping Unicode #28

Legimet opened this issue Jul 9, 2024 · 2 comments

Comments

@Legimet
Copy link
Contributor

Legimet commented Jul 9, 2024

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.

@adriweb
Copy link
Contributor

adriweb commented Jul 9, 2024

So this is fixed by #27 as well, right?

@Legimet
Copy link
Contributor Author

Legimet commented Jul 9, 2024

No, not yet. That PR just handles Lua.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants