call sanitizeOptions() in start() to prevent a third-party breakage
This commit is contained in:
parent
c45f050fe6
commit
6cf8c2b7d9
2 changed files with 40 additions and 8 deletions
|
|
@ -3523,10 +3523,10 @@ def scourString(in_string, options=None):
|
|||
# input is a filename
|
||||
# returns the minidom doc representation of the SVG
|
||||
def scourXmlFile(filename, options=None):
|
||||
# we need to set infilename (otherwise relative references in the SVG won't work)
|
||||
if options is None:
|
||||
options = generateDefaultOptions()
|
||||
options.infilename = filename
|
||||
# sanitize options (take missing attributes from defaults, discard unknown attributes)
|
||||
options = sanitizeOptions(options)
|
||||
# we need to make sure infilename is set correctly (otherwise relative references in the SVG won't work)
|
||||
options.ensure_value("infilename", filename)
|
||||
|
||||
# open the file and scour it
|
||||
with open(filename, "rb") as f:
|
||||
|
|
@ -3783,6 +3783,8 @@ def getReport():
|
|||
|
||||
|
||||
def start(options, input, output):
|
||||
# sanitize options (take missing attributes from defaults, discard unknown attributes)
|
||||
options = sanitizeOptions(options)
|
||||
|
||||
start = walltime()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue