diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-25 02:08:52 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-25 02:08:52 -0400 |
commit | bac77a32025a61928110eab85267e96a2c859b15 (patch) | |
tree | 0f693d57da68fa2be66df9042cf5482986e09bc2 /askbot/utils | |
parent | 4ad89216ff38c4d616b6821e69e5a889a6a59b2a (diff) | |
download | askbot-bac77a32025a61928110eab85267e96a2c859b15.tar.gz askbot-bac77a32025a61928110eab85267e96a2c859b15.tar.bz2 askbot-bac77a32025a61928110eab85267e96a2c859b15.zip |
made a setting to make question body optional
Diffstat (limited to 'askbot/utils')
-rw-r--r-- | askbot/utils/html.py | 5 |
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) |