From 2e1d0fe71eea9723f11fc85834ce70cd515d4428 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 9 Mar 2017 14:02:26 +0530 Subject: [PATCH] [minor] html_utils.py, bleach.linkify remove tokenizer --- frappe/utils/html_utils.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/frappe/utils/html_utils.py b/frappe/utils/html_utils.py index 6d91440f28..9824a64106 100644 --- a/frappe/utils/html_utils.py +++ b/frappe/utils/html_utils.py @@ -24,15 +24,7 @@ def sanitize_html(html, linkify=False): escaped_html = bleach.clean(html, tags=tags, attributes=attributes, styles=styles, strip_comments=strip_comments) if linkify: - # based on bleach.clean - class s(bleach.BleachSanitizer): - allowed_elements = tags - allowed_attributes = attributes - allowed_css_properties = styles - strip_disallowed_elements = False - strip_html_comments = strip_comments - - escaped_html = bleach.linkify(escaped_html, tokenizer=s) + escaped_html = bleach.linkify(escaped_html, callbacks=[]) return escaped_html