Opened 10 years ago

Closed 10 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 Paul)

If given a dictionary of extra attribute-values pairs, urlize should create <a> tags with the given attribute-value pairs.

https://github.com/logston/django/tree/ticket_23336

Change History (4)

comment:1 by Paul, 10 years ago

Description: modified (diff)

comment:2 by Paul, 10 years ago

Needs tests: set
Owner: changed from nobody to Paul
Status: newassigned

comment:3 by Claude Paroz, 10 years ago

Triage Stage: UnreviewedAccepted

You'll need to be careful about unsafe HTML content when building extra attributes.

comment:4 by Tim Graham, 10 years ago

Resolution: wontfix
Status: assignedclosed

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.
Back to Top