mirror of
https://github.com/moodle/moodle.git
synced 2025-03-20 07:30:01 +01:00
MDL-64240 mod_forum: Clean forum post text before storing
Previously only edited messages were cleaned, so longer strings could be stored in the database, which would never be displayed. This update takes into account trusted text before cleaning (as editing does).
This commit is contained in:
parent
b6995c29ec
commit
418831e096
@ -696,6 +696,9 @@ if ($mformpost->is_cancelled()) {
|
||||
// WARNING: the $fromform->message array has been overwritten, do not use it anymore!
|
||||
$fromform->messagetrust = trusttext_trusted($modcontext);
|
||||
|
||||
// Clean message text.
|
||||
$fromform = trusttext_pre_edit($fromform, 'message', $modcontext);
|
||||
|
||||
if ($fromform->edit) { // Updating a post.
|
||||
unset($fromform->groupid);
|
||||
$fromform->id = $fromform->edit;
|
||||
|
Loading…
x
Reference in New Issue
Block a user