Opened 13 years ago
Closed 13 years ago
#18071 closed Bug (fixed)
urlize is case-sensitive
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Uncategorized | Version: | 1.4 |
Severity: | Normal | Keywords: | urlize |
Cc: | adamzap@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
When you run urlize() on url schemes that have been uppercased, urlize fails to convert them to clickable links.
>>> from django.utils.html import urlize >>> urlize("foo http://bar.com https://baz.com HTTPS://bar.com") u'foo <a href="http://bar.com">http://bar.com</a> <a href="https://baz.com">https://baz.com</a> HTTPS://bar.com'
Expected output:
>>> from django.utils.html import urlize >>> urlize("foo http://bar.com https://baz.com HTTPS://bar.com") u'foo <a href="http://bar.com">http://bar.com</a> <a href="https://baz.com">https://baz.com</a> <a href="https://bar.com">HTTPS://bar.com</a>'
Attachments (2)
Change History (5)
by , 13 years ago
Attachment: | urlize.patch added |
---|
comment:1 by , 13 years ago
Needs tests: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 13 years ago
Attachment: | 18071-regression-test.diff added |
---|
Test for uppercase URL schemes with urlize
comment:2 by , 13 years ago
Cc: | added |
---|---|
Needs tests: | unset |
Note:
See TracTickets
for help on using tickets.
patch to make url regex case insensitive