#29798: truncatewords_html fails on some self-closing tags
--------------------------------------------+------------------------
               Reporter:  Béranger Enselme  |          Owner:  nobody
                   Type:  Uncategorized     |         Status:  new
              Component:  Template system   |        Version:  2.1
               Severity:  Normal            |       Keywords:
           Triage Stage:  Unreviewed        |      Has patch:  0
    Needs documentation:  0                 |    Needs tests:  0
Patch needs improvement:  0                 |  Easy pickings:  0
                  UI/UX:  0                 |
--------------------------------------------+------------------------
 Also in 1.11...

 {{{
 >>> from django.template.defaultfilters import truncatewords_html
 >>> truncatewords_html('<p class="alinea">one two three</p>', 2)
 '<p class="alinea">one two ...</p>'
 >>> truncatewords_html('<p class="alinea">one two three</p><p
 class="alinea"/><p class="alinea">four five</p>', 4)
 '<p class="alinea">one two three</p><p class="alinea"/><p
 class="alinea">four ...</p></p>'
 }}}

 `truncatewords_html` will add tag closures for every self-closing tag that
 has at least an attribute.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29798>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.50d55449a98970e7b29a84b112c9b3f0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to