Opened 8 years ago
Closed 8 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 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 8 years ago by
comment:3 Changed 8 years ago by
Triage Stage: | Unreviewed → Accepted |
---|
comment:4 Changed 8 years ago by
What about Go to google.com/?q=django!
? is the query django
or django!
?
comment:5 Changed 8 years ago by
Cc: | info+coding@… added |
---|
comment:6 follow-up: 7 Changed 8 years ago by
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 Changed 8 years ago by
Has patch: | set |
---|---|
Owner: | changed from nobody to Markus Holtermann |
Status: | new → assigned |
I added a pull-request: https://github.com/django/django/pull/3450
comment:9 Changed 8 years ago by
Triage Stage: | Accepted → Ready for checkin |
---|
comment:10 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Yes, but we should also consider the case where the ! is part of the URL. Random, made-up example: www.unicode-lookup.info/q=!