[minor] added is_html function
This commit is contained in:
parent
35078015f2
commit
2ae59c312d
1 changed files with 8 additions and 0 deletions
|
|
@ -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 <>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue