fix(is_html): Return false if text is not string

fix(is_html): Return false if text is not string
This commit is contained in:
Suraj Shetty 2018-12-31 11:05:39 +05:30 committed by GitHub
commit fb3d33593b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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):