From 98449f23e5f4e323f3e1b6ca593fee90be472de5 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Wed, 11 Sep 2013 21:05:05 +0200 Subject: Protect against empty subjects --- hyperkitty/lib/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hyperkitty/lib') diff --git a/hyperkitty/lib/__init__.py b/hyperkitty/lib/__init__.py index 1970917..8149ac5 100644 --- a/hyperkitty/lib/__init__.py +++ b/hyperkitty/lib/__init__.py @@ -27,6 +27,10 @@ def get_store(request): def stripped_subject(mlist, subject): if mlist is None: return subject + if not subject: + return u"(no subject)" + if not mlist.subject_prefix: + return subject if subject.lower().startswith(mlist.subject_prefix.lower()): subject = subject[len(mlist.subject_prefix) : ] return subject -- cgit