diff --git a/src/calibre/gui2/preferences/emailp.py b/src/calibre/gui2/preferences/emailp.py index a79e12950d..f28c5857f9 100644 --- a/src/calibre/gui2/preferences/emailp.py +++ b/src/calibre/gui2/preferences/emailp.py @@ -5,7 +5,7 @@ __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' -import textwrap +import textwrap, re from PyQt5.Qt import QAbstractTableModel, QFont, Qt @@ -148,7 +148,7 @@ class EmailAccounts(QAbstractTableModel): # {{{ if aval: self.tags[account] = aval elif col == 1: - self.accounts[account][0] = unicode(value or '').upper() + self.accounts[account][0] = re.sub(r'\s+', ',', unicode(value or '').upper()) elif col == 0: na = unicode(value or '') from email.utils import parseaddr @@ -287,4 +287,3 @@ if __name__ == '__main__': from PyQt5.Qt import QApplication app = QApplication([]) test_widget('Sharing', 'Email') -