Closed soraxas closed 5 years ago
Thanks for pointing this out! Not escaping everything was a major oversight on my part. However I think we can accomplish this slightly more neatly using the quoteattr
you linked to. If you can confirm this works I'll merge.
(Sorry about the git-spam, kept making silly mistakes.)
Yea looks good to me, thanks for the updates!
Great!
First of all thanks for the helpful script it helps me a lot on converting my textricate database :)
When I first ran your script I had some problem in parsing the result xml, which I later found that some of the characters are not escaped properly. This PR uses the build in xml escape module to escape characters
&
,<
, and>
into&
,<
, and>
respectively (which I was having problem with before).We couldn't use the
xml.sax.saxutils.quoteattr
to escape the quotes as it will adds a surrounding quotes to the string (see docs), therefore the replace is still needed.