please ckeck edit mode with special characters

zmx
Topic Author
Posts: 18
6 months 2 weeks ago - 6 months 2 weeks ago #4632 by zmx
just found a little problem:

when I edit a message, where some special characters are used,
which means the use of unicode eg.   with leading & (ampersand)
your code replaces the & with its entity and finally write (as we know from xml)  
so the inserted text cannot see the original   as space but writes emsp;

I'm shure this happens to all entity coded characters

can you check if this can be corrected?
Last edit: 6 months 2 weeks ago by zmx.

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

Lodder
Lodder's Avatar
Posts: 1264
6 months 2 weeks ago #4633 by Lodder
Hi,

The Shoutbox show HTML entities as their respecitve characters.
I believe it did several years ago, as we use Joomla's Input filtering, however this caused other issues.

We now display the raw sanitized text

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

zmx
Topic Author
Posts: 18
6 months 2 weeks ago #4634 by zmx
just checked the normal input with the same problem.

simply try this sentence:
das ist nur ein &nbsp,test

and you get displayed:
das ist nur ein &nbsp,test

this is the db entry
das ist nur ein &nbsp,test

so how can we fixthis?

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

zmx
Topic Author
Posts: 18
6 months 2 weeks ago - 6 months 2 weeks ago #4635 by zmx
found the reason and a solution:

in the function postFiltering (helper.php) you have this code

// Do the filtering
$name = htmlspecialchars($name, ENT_NOQUOTES);
$message = htmlspecialchars($message, ENT_NOQUOTES);

so the message is encoded to htmlentities which leads &xxx; to &ampxxx;

so just edit the message line to:
$message = htmlspecialchars($message, ENT_NOQUOTES,null,false);

the false parameter ensures that there is no double_encode
(tested and works :)
Last edit: 6 months 2 weeks ago by zmx.

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

Lodder
Lodder's Avatar
Posts: 1264
6 months 2 weeks ago #4636 by Lodder
Hi,

I've released v11.2.2 which fixes the issue with HTML entities.
Thank you for the report.

Regards,
Lodder

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

Powered by Kunena Forum