Skip to content

Commit 93fb835

Browse files
author
Richard Jones
committed
email obfuscation code in html templating is more robust
1 parent 88ed767 commit 93fb835

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Fixed:
1212
- lithuanian translation updated by Nerijus Baliunas (sf patch 1411175)
1313
- incompatibility with python2.3 in the mailer module (sf bug 1432602)
1414
- typo in SMTP TLS option name: "MAIL_TLS_CERFILE" (sf bug 1435452)
15+
- email obfuscation code in html templating is more robust
1516

1617

1718
2006-02-10 1.1.0

roundup/cgi/templating.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,8 +1307,9 @@ def email(self, escape=1):
13071307
value = ''
13081308
else:
13091309
value = str(self._value)
1310-
if value.find('@') != -1:
1311-
name, domain = value.split('@')
1310+
split = value.split('@')
1311+
if len(split) == 2:
1312+
name, domain = split
13121313
domain = ' '.join(domain.split('.')[:-1])
13131314
name = name.replace('.', ' ')
13141315
value = '%s at %s ...'%(name, domain)

0 commit comments

Comments
 (0)