[minor] added is_html function

This commit is contained in:
Anand Doshi 2013-09-04 16:45:32 +05:30
parent 35078015f2
commit 2ae59c312d

View file

@ -662,6 +662,14 @@ def unesc(s, esc_chars):
s = s.replace(esc_str, c)
return s
def is_html(text):
out = False
for key in ["<br>", "<p", "<img", "<div"]:
if key in text:
out = True
break
return out
def strip_html(text):
"""
removes anything enclosed in and including <>