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

Harden commonmark2html function

parent 5dbf63b9
...@@ -76,7 +76,13 @@ blueprint = flask.Blueprint('filters', __name__) ...@@ -76,7 +76,13 @@ blueprint = flask.Blueprint('filters', __name__)
@jinja2.contextfilter @jinja2.contextfilter
@blueprint.app_template_filter() @blueprint.app_template_filter()
def commonmark2html(context, value): def commonmark2html(context, value):
return commonmark(value) if not value:
return value
return commonmark(value)
except Exception as ex:
return value
app.register_blueprint(blueprint) app.register_blueprint(blueprint)
Supports Markdown
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