Opened 18 years ago
Closed 18 years ago
#4657 closed (fixed)
urlizetrunc filter appending elipsis to uris of exactly the truncate length
Description ¶
>>> from django.template.defaultfilters import urlizetrunc >>> uri = 'http://31characteruri.com/test/' >>> len(uri) 31 >>> urlizetrunc(uri, 31) '<a href="http://31characteruri.com/test/" rel="nofollow">http://31characteruri.com/test/...</a>'
The attached patch addresses this. Also, if the URI does need truncating, this patch changes it so that the truncation length is - 3 to adjust for the addition of the 3 elipsis characters (see the test in the patch for a better explanation).
Change History (4)
by , 18 years ago
Attachment: | urlize_trunc.patch added |
---|
by , 18 years ago
Attachment: | urlize_trunc.2.patch added |
---|
comment:1 by , 18 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:2 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
with tests this time