diff --git a/pillar/markdown.py b/pillar/markdown.py index 4da7d22f..b028977f 100644 --- a/pillar/markdown.py +++ b/pillar/markdown.py @@ -6,7 +6,7 @@ This is for user-generated stuff, like comments. from __future__ import absolute_import import bleach -import markdown as _markdown +import CommonMark ALLOWED_TAGS = [ 'a', @@ -36,7 +36,7 @@ ALLOWED_STYLES = [ def markdown(s): - tainted_html = _markdown.markdown(s) + tainted_html = CommonMark.commonmark(s) safe_html = bleach.clean(tainted_html, tags=ALLOWED_TAGS, attributes=ALLOWED_ATTRIBUTES, diff --git a/requirements.txt b/requirements.txt index 4af2b6d8..851ed5e6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,7 @@ blinker==1.4 bugsnag==2.3.1 bleach==1.4.3 Cerberus==0.9.2 +commonmark==0.7.2 Eve==0.6.3 Events==0.2.1 Flask==0.10.1 @@ -20,7 +21,6 @@ google-apitools==0.4.11 httplib2==0.9.2 idna==2.0 MarkupSafe==0.23 -markdown==2.6.7 ndg-httpsclient==0.4.0 Pillow==2.8.1 pycparser==2.14 @@ -50,6 +50,7 @@ cookies==2.2.1 cryptography==1.3.1 enum34==1.1.3 funcsigs==1.0.1 +future==0.15.2 html5lib==0.9999999 googleapis-common-protos==1.1.0 ipaddress==1.0.16