diff options
author | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-10-11 10:56:36 -0600 |
---|---|---|
committer | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-10-11 10:56:36 -0600 |
commit | e82ea2fa8a84a157a157a919fc1660024435baab (patch) | |
tree | d7971998c27013d9b444e1fb0be37d07cac7d2b5 | |
parent | 7658b6725d32488506f28e4867577516f2e4455f (diff) | |
download | askbot-e82ea2fa8a84a157a157a919fc1660024435baab.tar.gz askbot-e82ea2fa8a84a157a157a919fc1660024435baab.tar.bz2 askbot-e82ea2fa8a84a157a157a919fc1660024435baab.zip |
fixed clean_html_email issue in django 1.4.1
-rw-r--r-- | askbot/mail/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/askbot/mail/__init__.py b/askbot/mail/__init__.py index 74aa27e9..6daefcdd 100644 --- a/askbot/mail/__init__.py +++ b/askbot/mail/__init__.py @@ -89,8 +89,9 @@ def clean_html_email(email_body): soup = BeautifulSoup(email_body) table_tds = soup.find('body') + filter_func = lambda s: bool(s.strip()) phrases = map(lambda s: s.strip(), - filter(bool, table_tds.get_text().split('\n'))) + filter(filter_func, table_tds.get_text().split('\n'))) return '\n\n'.join(phrases) |