summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):