#29826: urlize does not handle HTML angle brackets correctly
-------------------------------------------+------------------------
               Reporter:  duck-rh          |          Owner:  nobody
                   Type:  Bug              |         Status:  new
              Component:  Template system  |        Version:  1.11
               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                |
-------------------------------------------+------------------------
 Quack,

 It was supposedly fixed in #24471 but I can reproduce with 1.11.16:

 {{{
 >>> import django
 >>> django.VERSION
 (1, 11, 16, u'final', 0)
 >>> from django.template.defaultfilters import urlize
 >>> print urlize("coin <https://www.example.org/> coin", 76)
 coin &amp;lt;<a href="https://www.example.org/%3E";
 rel="nofollow">https://www.example.org/&amp;gt;</a> coin
 }}}

 Same with Python 3 and 2.1.2:

 {{{
 >>> django.VERSION
 (2, 1, 2, 'final', 0)
 >>> print(urlize("coin &lt;https://www.example.org/&gt; coin", 76))
 coin &amp;lt;<a href="https://www.example.org/%3E";
 rel="nofollow">https://www.example.org/&amp;gt;</a> coin
 }}}

 I'll try to have a deeper look at the code but at the moment I have no fix
 to suggest.

 This impact Mailman 3: https://gitlab.com/mailman/hyperkitty/issues/29
 Hope we can find a workaround.

 Regards.
 \_o<

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29826>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.e5037a95453efc6756f307fd34e64f6d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to