diff roundup/cgi/templating.py @ 3573:d7bab396c228

email obfuscation code in html templating is more robust
author Richard Jones <richard@users.sourceforge.net>
date Tue, 21 Feb 2006 23:26:58 +0000
parents 32343bfc3da0
children 026adc5f1e13
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Tue Feb 21 05:50:10 2006 +0000
+++ b/roundup/cgi/templating.py	Tue Feb 21 23:26:58 2006 +0000
@@ -1307,8 +1307,9 @@
             value = ''
         else:
             value = str(self._value)
-        if value.find('@') != -1:
-            name, domain = value.split('@')
+        split = value.split('@')
+        if len(split) == 2:
+            name, domain = split
             domain = ' '.join(domain.split('.')[:-1])
             name = name.replace('.', ' ')
             value = '%s at %s ...'%(name, domain)

Roundup Issue Tracker: http://roundup-tracker.org/