Permalink
Browse files

hopefully fixed the repeated signature issue for some email clients

  • Loading branch information...
1 parent 393b50c commit 4aacfd1cd9dc827e8259daa622e1e2cc872e0162 @evgenyfadeev evgenyfadeev committed May 30, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 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):

0 comments on commit 4aacfd1

Please sign in to comment.