Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Validata
Validata UI
Commits
572ea9e4
Commit
572ea9e4
authored
Jul 18, 2019
by
Pierre Dittgen
Browse files
Harden commonmark2html function
parent
5dbf63b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
validata_ui/__init__.py
View file @
572ea9e4
...
...
@@ -76,7 +76,13 @@ blueprint = flask.Blueprint('filters', __name__)
@
jinja2
.
contextfilter
@
blueprint
.
app_template_filter
()
def
commonmark2html
(
context
,
value
):
return
commonmark
(
value
)
if
not
value
:
return
value
try
:
return
commonmark
(
value
)
except
Exception
as
ex
:
log
.
exception
(
ex
)
return
value
app
.
register_blueprint
(
blueprint
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment