Skip to content

Commit

Permalink
Merge pull request #36 from atesca09/fix_shell_escape
Browse files Browse the repository at this point in the history
Fix shell escape
  • Loading branch information
L2jLiga committed Oct 4, 2022
2 parents 5f88a37 + 48dc993 commit 03d1e78
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tasks/engines/fontforge/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import re
from subprocess import call
from distutils.spawn import find_executable
import shlex

args = json.load(sys.stdin)

Expand Down Expand Up @@ -98,7 +99,7 @@ def generate(filename):
# Hint the TTF file
# ttfautohint is optional
if args['autoHint'] and find_executable('ttfautohint'):
call('ttfautohint --symbol --fallback-script=latn --no-info "%(font)s.ttf" "%(font)s-hinted.ttf" && mv "%(font)s-hinted.ttf" "%(font)s.ttf"' % {'font': fontfile}, shell=False)
call(shlex.split('ttfautohint --symbol --fallback-script=latn --no-info "%(font)s.ttf" "%(font)s-hinted.ttf" && mv "%(font)s-hinted.ttf" "%(font)s.ttf"' % {'font': fontfile}))
f = fontforge.open(fontfile + '.ttf')

# SVG
Expand Down Expand Up @@ -132,7 +133,7 @@ def generate(filename):
# EOT
if 'eot' in args['types']:
# eotlitetool.py script to generate IE7-compatible .eot fonts
call('python "%(path)s/../../bin/eotlitetool.py" "%(font)s.ttf" --output "%(font)s.eot"' % {'path': scriptPath, 'font': fontfile}, shell=False)
call(shlex.split('python "%(path)s/../../bin/eotlitetool.py" "%(font)s.ttf" --output "%(font)s.eot"' % {'path': scriptPath, 'font': fontfile}))

# Delete TTF if not needed
if ('ttf' not in args['types']) and woff2_generated:
Expand Down

0 comments on commit 03d1e78

Please sign in to comment.