When a user send a message to another user an email is sent with the subject taken form the first line of the message. What if that line has special html characters? The bug first appeared with quotations being shown in the subject of the mail as follows:
"Hi Susan i would like to"
In order to solve this bug I propose to use html_entity_decode() php function. The code would be as follows:
In /message/lib.php on line 975:
$messagesubject = preg_replace('/\s+/', ' ', strip_tags($message)); // make sure it's all on one line
$messagesubject = html_entity_decode($messagesubject);
$messagesubject = message_shorten_message($messagesubject, 30).'...';