Skip to content

Commit

Permalink
1.6.1dev: avoid unicode digits in domain part of email address in wik…
Browse files Browse the repository at this point in the history
…i formatting (closes #13790)

git-svn-id: http://trac.edgewall.org/intertrac/log:/branches/1.6-stable@17857 af82e41b-90c4-0310-8c96-b1721e28e2e2
  • Loading branch information
jomae committed Oct 4, 2024
1 parent 43f72a7 commit 10025a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion trac/notification/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
r"[a-zA-Z0-9.'+_-]+" '@'
# the domain name part (RFC:1035)
r'(?:[a-zA-Z0-9_-]+\.)+' # labels (but also allow '_')
r'[a-zA-Z](?:[-a-zA-Z\d]*[a-zA-Z\d])?' # TLD
r'[a-zA-Z](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?' # TLD
)

_mime_encoding_re = re.compile(r'=\?[^?]+\?[bq]\?[^?]+\?=', re.IGNORECASE)
Expand Down
8 changes: 8 additions & 0 deletions trac/wiki/tests/wiki-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,10 @@ [email protected],
T_r+a-c1.23@yet_another-site.edu.au
[email protected]
[email protected]
local@exa६ple.org (U+096c)
[email protected]೬ (U+0cec)
[email protected]6g (U+ff16)
[email protected]𝟨 (U+1d7e8)
------------------------------
<p>
Author: <a class="mail-link" href="mailto:[email protected]"><span class="icon"></span>mailto:[email protected]</a>,
Expand All @@ -440,6 +444,10 @@ i.e. <a class="mail-link" href="mailto:[email protected]"><span class="icon"></
<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>
[email protected]
<a class="mail-link" href="mailto:[email protected]"><span class="icon"></span>[email protected]</a>-
local@exa६ple.org (U+096c)
<a class="mail-link" href="mailto:[email protected]"><span class="icon"></span>[email protected]</a>೬ (U+0cec)
<a class="mail-link" href="mailto:[email protected]"><span class="icon"></span>[email protected]</a>6g (U+ff16)
<a class="mail-link" href="mailto:[email protected]"><span class="icon"></span>[email protected]</a>𝟨 (U+1d7e8)
</p>
------------------------------
============================== Arbitrary protocol Link
Expand Down

0 comments on commit 10025a5

Please sign in to comment.