Commit ba1e735b authored by Nicolas Delaby's avatar Nicolas Delaby

Small optimisation

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41492 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6fe97c02
......@@ -384,10 +384,8 @@ class EmailDocument(TextDocument):
return self._baseGetTitle(default)
subject = self.getContentInformation().get('Subject', '')
# Remove all newlines
if '\r' in subject:
subject = ''.join(subject.split('\r'))
if '\n' in subject:
subject = ''.join(subject.split('\n'))
subject = subject.replace('\r', '')
subject = subject.replace('\n', '')
return subject
security.declareProtected(Permissions.AccessContentsInformation, 'getStartDate')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment