I have this function which trims the thread-title of the latest posts after a query fetches the latest posts. Everything works well except I've noticed that if this query trims the thread-title at a speech-mark ( " ) , instead of displaying the speech-mark in the result it shows &quo... instead. But if I increase the cut-off by a few more characters then the speech mark is displayed correctly. How can I make the query display the speech-mark without it displaying '"...' at certain lengths of cutoff?
Here is the query to trim the thread-title:
PHP Code:
if (strlen($row['thread_title']) > $vbulletin->options['latest_trimplusthree']) { // adds the cutoff ... with substr $row['thread_title'] = substr($row['thread_title'], 0, $vbulletin->options['latest_trim']) . '...'; }
--------------- Added [DATE]1220329262[/DATE] at [TIME]1220329262[/TIME] ---------------