Opened 12 years ago
Closed 12 years ago
#19693 closed Bug (fixed)
truncatewords_html closes <br/> <hr/> tags
Reported by: | sneawo | Owned by: | jonathanl |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | sneawo | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Change History (10)
comment:1 by , 12 years ago
Cc: | added |
---|
comment:2 by , 12 years ago
Summary: | trancatewords_html duplicates <br/> <hr/> tags → trancatewords_html closes <br/> <hr/> tags |
---|
comment:3 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 12 years ago
Summary: | trancatewords_html closes <br/> <hr/> tags → truncatewords_html closes <br/> <hr/> tags |
---|
comment:5 by , 12 years ago
comment:6 by , 12 years ago
Could you possibly provide more information about this bug? The current description of this bug is not clear enough for me to attempt to replicate. Thanks!
comment:7 by , 12 years ago
The report isn't accurate; to reproduce on master:
>>> from django.template.defaultfilters import truncatewords_html >>> truncatewords_html('test<br/><hr/>test test', 2) u'test<br/><hr/>test ...</hr/></br/>'
comment:8 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:9 by , 12 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Version: | 1.4 → master |
Made a pull request https://github.com/django/django/pull/716
Thanks sneawo for your suggestion. It worked.
comment:10 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
I think it can be fixed with updating
re_tag
indjango.utils.text
re_tag = re.compile(r'<(/)?([^ ]+?)(?:(\s*/)| .*?)?>')