changeset 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 a052781093d7
children 7bf2b4523b75
files CHANGES.txt roundup/cgi/templating.py
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Tue Feb 21 05:50:10 2006 +0000
+++ b/CHANGES.txt	Tue Feb 21 23:26:58 2006 +0000
@@ -12,6 +12,7 @@
 - lithuanian translation updated by Nerijus Baliunas (sf patch 1411175)
 - incompatibility with python2.3 in the mailer module (sf bug 1432602)
 - typo in SMTP TLS option name: "MAIL_TLS_CERFILE" (sf bug 1435452)
+- email obfuscation code in html templating is more robust
 
 
 2006-02-10 1.1.0
--- 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/