From 8150d65084ceca5c857bf4e912d60cfe2988b477 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sat, 6 Jun 2020 10:49:31 +0530 Subject: [PATCH] fix: Remove linkify to retain spaces in text-editor --- frappe/utils/html_utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frappe/utils/html_utils.py b/frappe/utils/html_utils.py index c740252b5c..302813645e 100644 --- a/frappe/utils/html_utils.py +++ b/frappe/utils/html_utils.py @@ -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):