mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
allow includegraphics in latex
This commit is contained in:
parent
70008a8f40
commit
adf4f4687c
1 changed files with 2 additions and 1 deletions
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue