mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Merge branch 'MDL-79557-master' of https://github.com/jleyva/moodle
This commit is contained in:
commit
b896c303f3
@ -2141,6 +2141,8 @@ class core_message_external extends external_api {
|
||||
$message->usertofullname = $usertofullname;
|
||||
}
|
||||
|
||||
// Clean subject of html.
|
||||
$message->subject = clean_param($message->subject, PARAM_TEXT);
|
||||
$message->text = message_format_message_text($message);
|
||||
$messages[$mid] = (array) $message;
|
||||
}
|
||||
|
@ -1438,13 +1438,14 @@ class externallib_test extends externallib_advanced_testcase {
|
||||
$eventdata->smallmessage = $eventdata->subject;
|
||||
message_send($eventdata);
|
||||
|
||||
// This event contains HTML in the subject field that will be removed by the WS (otherwise it will generate an exception).
|
||||
$eventdata = new \core\message\message();
|
||||
$eventdata->courseid = $course->id;
|
||||
$eventdata->name = 'submission';
|
||||
$eventdata->component = 'mod_feedback';
|
||||
$eventdata->userfrom = $user1;
|
||||
$eventdata->userto = $user2;
|
||||
$eventdata->subject = 'Feedback submitted';
|
||||
$eventdata->subject = 'Feedback submitted <span>with html</span>';
|
||||
$eventdata->fullmessage = 'Feedback submitted from an user';
|
||||
$eventdata->fullmessageformat = FORMAT_PLAIN;
|
||||
$eventdata->fullmessagehtml = '<strong>Feedback submitted</strong>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user