Kattis / problemtools

Tools to manage problem packages using the Kattis problem package format.
MIT License
105 stars 72 forks source link

remove cgi, which seems to be causing problems #163

Closed ghamerly closed 4 years ago

ghamerly commented 4 years ago

Fixes #162

cgi.escape() would cause "<" to become "&lt;", which would then get rendered by plasTeX as "&amp;lt;". Removing cgi.escape() fixes the issue.

One other change rolled into this commit is a necessary change to listingsutf8.py to read input files properly.

ghamerly commented 4 years ago

Commit 2ccd713 differentiates between python2 and python3 (as a proxy for the version of plasTeX, which does not seem to advertise its version as far as I can see). For py2, we retain the use of cgi.escape(); for py3 we do not. I've tested this on a few problems.

ghamerly commented 4 years ago

Commit e94d3a6 fixes an unrelated bug I found; python3 does not have the file() command.

ghamerly commented 4 years ago

Merging as these changes are essential for running properly under python3.