fix: Remove linkify to retain spaces in text-editor
This commit is contained in:
parent
3c69d17ae1
commit
8150d65084
1 changed files with 1 additions and 4 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue