thirtybees / niara

Niara, thirty bees default theme since v1.1.0.
https://thirtybees.com
9 stars 26 forks source link

Invalid HTML generated due to strip_tags after truncate #59

Closed WBNet-Wout closed 1 year ago

WBNet-Wout commented 1 year ago

Niara seems to do something like the following on various places:

https://github.com/thirtybees/niara/blob/eddb7661e611f9f4f494449eec0cea134c0c884d/modules/beesblogrecentposts/views/templates/hooks/home.tpl#L49

This can cause it to generate for example the following invalid HTML:

<p> Misschien heeft u gezien dat wij  spanningsgestuurde  en <a...</p>

As you can see, it generated an unclosed tag, i.e. <a in this example. To prevent this, you can call strip_tags first and afterwards call truncate, like the following:

<p>{$post->content|strip_tags:false|truncate:150}</p>
getdatakick commented 1 year ago

Closed by e8e7e46f18f5ff1b52df67b27382058be8af8537. Thanks for reporting this issue