From 041e8dd4b2f987dd812ca5310b405abcee1a07ab Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Sun, 30 Dec 2018 12:26:47 +0530 Subject: [PATCH] fix(is_html): Return false if not string --- frappe/utils/data.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frappe/utils/data.py b/frappe/utils/data.py index c8599c4b87..6514489f74 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -568,6 +568,8 @@ def in_words(integer, in_million=True): return ret.replace('-', ' ') def is_html(text): + if not isinstance(text, frappe.string_types): + return False return re.search('<[^>]+>', text) def is_image(filepath):