urlizetrunc filter appending elipsis to uris of exactly the truncate length
>>> 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)
Triage Stage: |
Unreviewed → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
with tests this time