We've improved our algorithm for truncating text. There is always the danger that the preview version of the text you are shortening may have HTML in it, and if we simply truncate after X characters it can break the HTML (sometimes with ugly consequences). We had an imperfect work around for a while (that would strip the HTML in those cases just to be safe), but that meant sometimes the preview wouldn't have desired styling. So we just upgraded the function so that it detects and closes the HTML tags so that they are no longer broken. Nice little improvement.
Truncating Text
- CMS Updates News Development Log Blog
-
January 07, 2011 05:01pm