html error / suggestion for next update

zmx
Topic Author
Posts: 18
2 years 9 months ago #4548 by zmx
I saw, that when unicode strings were used for special characters the basic htmlspecialchars
will encode the & (amp) to & so the character gets lost.
in the helper.php (where message is encoded line 521) better use the 4th parameter to exclude double-encoding

htmlspecialchars($message, ENT_QUOTES, "UTF-8", false);

Please Log in or Create an account to join the conversation.

Lodder
Lodder's Avatar
Posts: 1264
2 years 9 months ago #4549 by Lodder
Replied by Lodder on topic html error / suggestion for next update
Thanks for the report.
What version of PHP are you using?

Please Log in or Create an account to join the conversation.

zmx
Topic Author
Posts: 18
2 years 9 months ago #4550 by zmx
Replied by zmx on topic html error / suggestion for next update
php 8.2.6

Please Log in or Create an account to join the conversation.

Lodder
Lodder's Avatar
Posts: 1264
2 years 9 months ago #4551 by Lodder
Replied by Lodder on topic html error / suggestion for next update
Hmm, I can't seem to replicate this at all.
If I type "&" in the message field, it appears correctly...even after editing the field.

Please Log in or Create an account to join the conversation.

zmx
Topic Author
Posts: 18
2 years 9 months ago #4552 by zmx
Replied by zmx on topic html error / suggestion for next update
try a combo as in unicodes:
e.g.   (wide space)
will be encoded to   so the unicode will not be decoded and in message   is shown.

Please Log in or Create an account to join the conversation.

Lodder
Lodder's Avatar
Posts: 1264
2 years 9 months ago #4553 by Lodder
Replied by Lodder on topic html error / suggestion for next update
I've tried several variations with, multiple unicode characters, on several PHP versions, and various database table collations. I still cannot replicate it.
This was tested on a fresh installation of Joomla and Shoutbox Pro.

I just looked at the site you provide me a while back and can see you have made a fair amount of modifications to the Shoutbox. Is it possible your modifications have caused this?

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum