allow includegraphics in latex

This commit is contained in:
Damien Elmes 2013-07-18 19:04:38 +09:00
parent 70008a8f40
commit adf4f4687c

View file

@ -72,9 +72,10 @@ def _buildImg(col, latex, fname, model):
model["latexPost"])
latex = latex.encode("utf8")
# it's only really secure if run in a jail, but these are the most common
tmplatex = latex.replace("\\includegraphics", "")
for bad in ("write18", "\\readline", "\\input", "\\include", "\\catcode",
"\\openout", "\\write", "\\loop", "\\def", "\\shipout"):
if bad in latex:
if bad in tmplatex:
return _("""\
For security reasons, '%s' is not allowed on cards. You can still use \
it by placing the command in a different package, and importing that \