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.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/askbot/utils/html.py b/askbot/utils/html.py
index 29e8bd70..d7b321da 100644
--- a/askbot/utils/html.py
+++ b/askbot/utils/html.py
@@ -73,7 +73,7 @@ def replace_links_with_text(html):
return '%s (%s)' % (url, text)
return url or text or ''
- soup = BeautifulSoup(html)
+ soup = BeautifulSoup(html, 'html5lib')
abs_url_re = r'^http(s)?://'
images = soup.find_all('img')
@@ -103,7 +103,7 @@ def strip_tags(html, tags=None):
assert(tags != None)
- soup = BeautifulSoup(html)
+ soup = BeautifulSoup(html, 'html5lib')
for tag in tags:
tag_matches = soup.find_all(tag)
map(lambda v: v.replaceWith(''), tag_matches)