[patch] truncatewords filter can invalidate your HTML
|Reported by:||ubernostrum||Owned by:||adrian|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The truncatewords filter is not HTML-aware, which means that when it's used to clip out part of a block of HTML text (say, for purposes of providing an excerpt), it can cut off at text in the middle of a tag. This will, usually, invalidate the HTML and can easily cause severe layout problems.
Perhaps an alternative filter could be added which is HTML-safe?
Change History (14)
comment:1 Changed 10 years ago by SmileyChris
- Summary changed from truncatewords filter can invalidate your HTML to [patch] truncatewords filter can invalidate your HTML
comment:7 Changed 10 years ago by Simon G. <dev@…>
- Keywords truncatewords templates added
- Triage Stage changed from Unreviewed to Ready for checkin