Opened 10 years ago
Closed 10 years ago
#23715 closed Bug (fixed)
Template tag urlize and exclamation mark
Reported by: | Steven | Owned by: | Markus Holtermann |
---|---|---|---|
Component: | Template system | Version: | 1.7 |
Severity: | Normal | Keywords: | |
Cc: | info+coding@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
The template tag urlize
cannot create the urls correctly when an exclamation mark follows an url.
text = "Check out www.djangoproject.com!"
text|urlize
results in:
"Check out <a href="(...)!">www.djangoproject.com!</a>"
Change History (10)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:5 by , 10 years ago
Cc: | added |
---|
follow-up: 7 comment:6 by , 10 years ago
Mail.app has sophisticated URL detection rules, and here's how it handles the examples we've given above:
- http://www.unicode-lookup.info/q=! — ! isn't part of the link.
- [google.com/?q=django`?] — I can't get Trac to render this one properly; !`? is part of the link.
comment:7 by , 10 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
I added a pull-request: https://github.com/django/django/pull/3450
comment:9 by , 10 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:10 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Yes, but we should also consider the case where the ! is part of the URL. Random, made-up example: www.unicode-lookup.info/q=!