diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-05-30 12:00:51 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-05-30 12:00:51 -0400 |
commit | 4aacfd1cd9dc827e8259daa622e1e2cc872e0162 (patch) | |
tree | 9ae75c17addd9079551bf063becbb68967d1c196 | |
parent | 393b50cd9f4036c7f9b17ef10f82f740cf3ce996 (diff) | |
download | askbot-4aacfd1cd9dc827e8259daa622e1e2cc872e0162.tar.gz askbot-4aacfd1cd9dc827e8259daa622e1e2cc872e0162.tar.bz2 askbot-4aacfd1cd9dc827e8259daa622e1e2cc872e0162.zip |
hopefully fixed the repeated signature issue for some email clients
-rw-r--r-- | askbot/models/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/askbot/models/__init__.py b/askbot/models/__init__.py index 88041acc..fadbe450 100644 --- a/askbot/models/__init__.py +++ b/askbot/models/__init__.py @@ -207,12 +207,12 @@ def user_update_avatar_type(self): def user_strip_email_signature(self, text): """strips email signature from the end of the text""" - if self.email_signature == '': + if self.email_signature.strip() == '': return text text = '\n'.join(text.splitlines())#normalize the line endings - if text.endswith(self.email_signature): - return text[0:-len(self.email_signature)] + while text.endswith(self.email_signature): + text = text[0:-len(self.email_signature)] return text def _check_gravatar(gravatar): |