From 4aacfd1cd9dc827e8259daa622e1e2cc872e0162 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Wed, 30 May 2012 12:00:51 -0400 Subject: hopefully fixed the repeated signature issue for some email clients --- askbot/models/__init__.py | 6 +++--- 1 file 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): -- cgit v1.2.3-1-g7c22