From 2d7c50cb5c9d5a26d9ae874172a17958615f1834 Mon Sep 17 00:00:00 2001 From: Rohan Bansal Date: Fri, 18 Oct 2019 15:19:14 +0530 Subject: [PATCH] fix: allow bold and underline tags while adding comment --- frappe/utils/html_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frappe/utils/html_utils.py b/frappe/utils/html_utils.py index 5a54cd3ce8..5f3a6b4338 100644 --- a/frappe/utils/html_utils.py +++ b/frappe/utils/html_utils.py @@ -10,8 +10,8 @@ def clean_html(html): return html return bleach.clean(clean_script_and_style(html), - tags=['div', 'p', 'br', 'ul', 'ol', 'li', 'b', 'i', 'em', - 'table', 'thead', 'tbody', 'td', 'tr'], + tags=['div', 'p', 'br', 'ul', 'ol', 'li', 'strong', 'b', 'em', 'i', 'u', + 'table', 'thead', 'tbody', 'td', 'tr'], attributes=[], styles=['color', 'border', 'border-color'], strip=True, strip_comments=True) @@ -21,7 +21,7 @@ def clean_email_html(html): return html return bleach.clean(clean_script_and_style(html), - tags=['div', 'p', 'br', 'ul', 'ol', 'li', 'b', 'i', 'em', 'a', + tags=['div', 'p', 'br', 'ul', 'ol', 'li', 'strong', 'b', 'em', 'i', 'u', 'a', 'table', 'thead', 'tbody', 'td', 'tr', 'th', 'pre', 'code', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'button', 'img'], attributes=['border', 'colspan', 'rowspan',