#29798: truncatewords_html fails on some self-closing tags
----------------------------------+--------------------------------------
Reporter: Béranger Enselme | Owner: nobody
Type: Uncategorized | Status: closed
Component: Template system | Version: 2.1
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by Carlton Gibson):
* status: new => closed
* resolution: => invalid
Comment:
I think this is invalid. If I pump your HTML fragment into
[https://validator.w3.org/ the W3 HTML Validator] (as HTML 5) I get
(amongst errors about the document structure not being right) this:
> Error: Self-closing syntax (/>) used on a non-void HTML element.
Ignoring the slash and treating as a start tag.
> From line 1, column 36; to line 1, column 54
> `three</p><p class="alinea"/><p cla`
Looks like `truncatewords_html`'s behaviour is correct.
--
Ticket URL: <https://code.djangoproject.com/ticket/29798#comment:1>
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/066.84ed1aff35cffe55dbdd39e401ed2985%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.