Commit 572ea9e4 authored by Pierre Dittgen's avatar Pierre Dittgen

Harden commonmark2html function

parent 5dbf63b9
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment