Commit 28500dd9 authored by Yusei Tahara's avatar Yusei Tahara

Remove newlines from subject.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22358 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 51e50197
...@@ -225,7 +225,13 @@ class EmailDocument(File, TextDocument): ...@@ -225,7 +225,13 @@ class EmailDocument(File, TextDocument):
return self._baseGetTitle() return self._baseGetTitle()
else: else:
return self._baseGetTitle(default) return self._baseGetTitle(default)
return self.getContentInformation().get('Subject', '') 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'))
return subject
def title_or_id(self): def title_or_id(self):
"""Return the title if it is not blank and the id otherwise. """Return the title if it is not blank and the id otherwise.
......
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