Use the same markdown library for displaying as for editing - could enable a security run_pyl
This commit is contained in:
parent
df49b15292
commit
54be9535f6
|
@ -565,11 +565,9 @@ def _render_jinja_template(unprocessed_template: str, spiff_task: SpiffTask) ->
|
||||||
raise wfe from template_error
|
raise wfe from template_error
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
type, value, tb = exc_info()
|
type, value, tb = exc_info()
|
||||||
wfe = WorkflowTaskException(
|
wfe = WorkflowTaskException(str(error), task=spiff_task, exception=error)
|
||||||
str(error), task=spiff_task, exception=error
|
|
||||||
)
|
|
||||||
while tb:
|
while tb:
|
||||||
if tb.tb_frame.f_code.co_filename == '<template>':
|
if tb.tb_frame.f_code.co_filename == "<template>":
|
||||||
wfe.line_number = tb.tb_lineno
|
wfe.line_number = tb.tb_lineno
|
||||||
wfe.error_line = unprocessed_template.split("\n")[tb.tb_lineno - 1]
|
wfe.error_line = unprocessed_template.split("\n")[tb.tb_lineno - 1]
|
||||||
tb = tb.tb_next
|
tb = tb.tb_next
|
||||||
|
|
Loading…
Reference in New Issue