fix(is_html): Return false if text is not string
This commit is contained in:
parent
dfb725fe7f
commit
ae57e75b0e
1 changed files with 2 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue