Page 1 of 1

Prevent empty title

Posted: Sun May 10, 2026 9:42 pm
by Stargateur
https://mods.factorio.com/mod/heart-attack/discussion have a thread with an empty title it's impossible to click on it

Thus it possible to get it reading the html https://mods.factorio.com/mod/heart-att ... a9914f6201

Re: Prevent empty title

Posted: Mon May 11, 2026 12:14 pm
by Yess
The title of the linked thread isn't actually empty, it just isn't visible because it consists of two spaces.

It is still clickable (image shows the title with cursor hovered over it):
05-11-2026, 15-11-14.png
05-11-2026, 15-11-14.png (11.7 KiB) Viewed 369 times
I'm not saying this as though this is perfectly fine, it is still a silly title that should probably have some kind of validation check to prevent it (just prevent title from being only made up of spaces); just mentioning that the title is technically not empty and is accessible normally without needing to open the HTML.

Re: Prevent empty title

Posted: Tue May 12, 2026 2:07 am
by Stargateur
firefox doesn't show anything and is mostly right to do so "<a href="/mod/heart-attack/discussion/6749ea4542705fa9914f6201" title="ㅤ">ㅤ</a>". title IS empty.

Yes need more than just empty, some rules could help here like minimum length title. at least few non white space character.

Re: Prevent empty title

Posted: Tue May 12, 2026 7:46 am
by Yess
Stargateur wrote: Tue May 12, 2026 2:07 am firefox doesn't show anything and is mostly right to do so "<a href="/mod/heart-attack/discussion/6749ea4542705fa9914f6201" title="ㅤ">ㅤ</a>". title IS empty.
Oh! I didn't realise that Firefox does things differently. It seems like Chromium-based browsers display this title as it is, while Firefox turns the title into a null string that cannot be displayed. Also just noticed that this isn't actually a normal space (U+0020), it is U+3164. Probably explains why Chromium doesn't recognise it as whitespace to trim it while Firefox does.