• Welcome to Simple Machines Community Forum. Please login or sign up.
September 16, 2021, 07:05:21 PM


Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

A long topic title & it gets shortened for display on the main page

Started by Kolya, February 18, 2021, 05:02:11 PM

Previous topic - Next topic


When a topic title is long and it gets shortened for display on the main page (an ellipsis is added at the end), then an "&" in the topic title becomes "&amp" on the main page.

This bug manifests in $board['last_post']['link'] and $board['last_post']['subject']
I suspect it happens in the function that shortens the topic title because it doesn't happen to short titles.

SMF 2.0.18


In my opinion the shortening of the title shouldn't even be handled in PHP but by CSS text-overflow property, as needed.


Yes that would make sense, but it's legacy code from the days when that CSS didn't exist. SMF 2.0.x only gets really necessary fixes these days, so the old code is still in there.

Replacing the PHP shortening with CSS would make sense for SMF 2.1, if it hasn't been done already.