Opened 11 years ago
Closed 11 years ago
#23336 closed New feature (wontfix)
Allow urlize to accept extra attributes.
| Reported by: | Paul | Owned by: | Paul |
|---|---|---|---|
| Component: | Template system | Version: | dev |
| Severity: | Normal | Keywords: | templatetag, urlize |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | yes | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
If given a dictionary of extra attribute-values pairs, urlize should create <a> tags with the given attribute-value pairs.
Change History (4)
comment:1 by , 11 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 11 years ago
| Needs tests: | set |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
comment:3 by , 11 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:4 by , 11 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | assigned → closed |
The proposed patch only modifies django.utils.html.urlize() which isn't a documented public API and I'd consider it a private API for use by the urlize template tag. Not sure this is all that useful if the template tag can't make use of it. Overall, I think the use case is very narrow and not worth the extra complexity it will add.
Note:
See TracTickets
for help on using tickets.
You'll need to be careful about unsafe HTML content when building extra attributes.