Skip to content

Commit 10025a5

Browse files
author
jomae
committed
1.6.1dev: avoid unicode digits in domain part of email address in wiki formatting (closes #13790)
git-svn-id: http://trac.edgewall.org/intertrac/log:/branches/1.6-stable@17857 af82e41b-90c4-0310-8c96-b1721e28e2e2
1 parent 43f72a7 commit 10025a5

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

trac/notification/mail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
r"[a-zA-Z0-9.'+_-]+" '@'
6060
# the domain name part (RFC:1035)
6161
r'(?:[a-zA-Z0-9_-]+\.)+' # labels (but also allow '_')
62-
r'[a-zA-Z](?:[-a-zA-Z\d]*[a-zA-Z\d])?' # TLD
62+
r'[a-zA-Z](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?' # TLD
6363
)
6464

6565
_mime_encoding_re = re.compile(r'=\?[^?]+\?[bq]\?[^?]+\?=', re.IGNORECASE)

trac/wiki/tests/wiki-tests.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,10 @@ [email protected],
429429
T_r+a-c1.23@yet_another-site.edu.au
430430
431431
432+
local@exa६ple.org (U+096c)
433+
[email protected]೬ (U+0cec)
434+
[email protected]6g (U+ff16)
435+
[email protected]𝟨 (U+1d7e8)
432436
------------------------------
433437
<p>
434438
Author: <a class="mail-link" href="mailto:[email protected]"><span class="icon"></span>mailto:[email protected]</a>,
@@ -440,6 +444,10 @@ i.e. <a class="mail-link" href="mailto:[email protected]"><span class="icon"></
440444
<a class="mail-link" href="mailto:T_r+a-c1.23@yet_another-site.edu.au"><span class="icon"></span>T_r+a-c1.23@yet_another-site.edu.au</a>
441445
442446
<a class="mail-link" href="mailto:[email protected]"><span class="icon"></span>[email protected]</a>-
447+
local@exa६ple.org (U+096c)
448+
<a class="mail-link" href="mailto:[email protected]"><span class="icon"></span>[email protected]</a>೬ (U+0cec)
449+
<a class="mail-link" href="mailto:[email protected]"><span class="icon"></span>[email protected]</a>6g (U+ff16)
450+
<a class="mail-link" href="mailto:[email protected]"><span class="icon"></span>[email protected]</a>𝟨 (U+1d7e8)
443451
</p>
444452
------------------------------
445453
============================== Arbitrary protocol Link

0 commit comments

Comments
 (0)