summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-05-30 12:00:51 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-05-30 12:00:51 -0400
commit4aacfd1cd9dc827e8259daa622e1e2cc872e0162 (patch)
tree9ae75c17addd9079551bf063becbb68967d1c196
parent393b50cd9f4036c7f9b17ef10f82f740cf3ce996 (diff)
downloadaskbot-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__.py6
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):