TruncateString

Hi

I use this code, to Truncate the string

<xsl:variable name="body" select="$node/data[@alias = 'Body']" />
<xsl:value-of select="umbraco.library:TruncateString(umbraco.library:StripHtml($body) ,100, '...')" disable-output-escaping="yes" />

 

however. Because entries can contain special charachters like æ, ø, å., these are converted to fx "&aring;" But the HTML is Truncated before the characthers are converted. This means that"&aring;" might be cut in the middle, and the correct charachter is not displayed on the webpage

 

 

Thanks


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/9757-truncatestring