summaryrefslogtreecommitdiffstats
path: root/askbot/utils/html.py
diff options
context:
space:
mode:
Diffstat (limited to 'askbot/utils/html.py')
-rw-r--r--askbot/utils/html.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/askbot/utils/html.py b/askbot/utils/html.py
index 549f22bf..9fb46337 100644
--- a/askbot/utils/html.py
+++ b/askbot/utils/html.py
@@ -97,7 +97,12 @@ def replace_links_with_text(html):
def strip_tags(html, tags=None):
"""strips tags from given html output"""
+ #a corner case
+ if html.strip() == '':
+ return html
+
assert(tags != None)
+
soup = BeautifulSoup(html)
for tag in tags:
tag_matches = soup.find_all(tag)