fix: Remove linkify to retain spaces in text-editor

This commit is contained in:
Suraj Shetty 2020-06-06 10:49:31 +05:30
parent 3c69d17ae1
commit 8150d65084

View file

@ -68,13 +68,10 @@ def sanitize_html(html, linkify=False):
styles = bleach_whitelist.all_styles
strip_comments = False
# retuns html with escaped tags, escaped orphan >, <, etc.
# returns html with escaped tags, escaped orphan >, <, etc.
escaped_html = bleach.clean(html, tags=tags, attributes=attributes, styles=styles,
strip_comments=strip_comments, protocols=['cid', 'http', 'https', 'mailto'])
if linkify:
escaped_html = bleach.linkify(escaped_html, callbacks=[])
return escaped_html
def is_json(text):