Opened 11 years ago

Closed 11 years ago

#20172 closed Bug (fixed)

utils.html.urlize does not recognize IPv6 URLs

Reported by: Marc Aymerich Owned by: nobody
Component: Utilities Version: 1.5
Severity: Normal Keywords: urlize, ipv6
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Current urlize regex does not interpret IPv6 URLs because of being between brackets: [%(ipv6_address)s]

>>> from django.utils.html import urlize
>>> urlize("http://[fdf5:5351:1dfd::2]/api/nodes/81")
u'http://[fdf5:5351:1dfd::2]/api/nodes/81'

Change History (2)

comment:1 by Marc Aymerich, 11 years ago

Easy pickings: set
Has patch: set

Pull request https://github.com/django/django/pull/981 fixes the issue and also adds a testcase for IPv6 URLs

comment:2 by Claude Paroz <claude@…>, 11 years ago

Resolution: fixed
Status: newclosed

In b474ffe63a3f99daeef2324a674f7ddfbb653c41:

Fixed #20172 -- Ensured urlize supports IPv4/IPv6 addresses

Thanks Marc Aymerich for the report and the initial patch.

Note: See TracTickets for help on using tickets.
Back to Top