#36017: Urlize email address allows punctuation in domains
------------------------------+--------------------------------------
     Reporter:  Mike Edmunds  |                     Type:  Bug
       Status:  new           |                Component:  Utilities
      Version:  5.1           |                 Severity:  Normal
     Keywords:                |             Triage Stage:  Unreviewed
    Has patch:  0             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+--------------------------------------
 The urlize template filter incorrectly recognizes domains in email
 addresses, linkifying punctuation that shouldn't be included in the
 address:

 {{{#!python
 # Django 5.1.4, Python 3.12.4
 from django.template.defaultfilters import urlize
 urlize("email [email protected],then I'll respond")
 'email <a href="mailto:[email protected],then";>[email protected],then</a>
 I&#x27;ll respond'
 urlize("test@example?;+!.com")
 '<a href="mailto:test@example?;+!.com";>test@example?;+!.com</a>'
 }}}

 The first example should probably stop before the comma. The second
 example probably shouldn't linkify at all.

 See also #36012.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36017>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070193d0ebb38e-c712d2c4-8915-4de0-bb90-9782983617b8-000000%40eu-central-1.amazonses.com.

Reply via email to