MDL-56252 message: clean message text in message area
Remove the HTML tags from any message in the message area when updating the last message on the contact otherwise the styling breaks and also allows <script> tags to be added to the page.
This commit is contained in:
@@ -147,7 +147,8 @@ class helper {
|
||||
$data->messageid = null;
|
||||
if (isset($contact->smallmessage)) {
|
||||
$data->ismessaging = true;
|
||||
$data->lastmessage = $contact->smallmessage;
|
||||
// Strip the HTML tags from the message for displaying in the contact area.
|
||||
$data->lastmessage = clean_param($contact->smallmessage, PARAM_NOTAGS);
|
||||
$data->useridfrom = $contact->useridfrom;
|
||||
if (isset($contact->messageid)) {
|
||||
$data->messageid = $contact->messageid;
|
||||
|
||||
Reference in New Issue
Block a user