mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-61196 message_popup: clean params before returning via WS
This commit is contained in:
parent
315a0a3aaf
commit
cb21b5b7fb
1 changed files with 4 additions and 0 deletions
|
@ -70,6 +70,10 @@ class popup_notification implements templatable, renderable {
|
|||
$context->timecreatedpretty = get_string('ago', 'message', format_time(time() - $context->timecreated));
|
||||
$context->text = message_format_message_text($context);
|
||||
$context->read = $context->timeread ? true : false;
|
||||
|
||||
// Need to strip any HTML from these.
|
||||
$context->subject = clean_param($context->subject, PARAM_TEXT);
|
||||
$context->contexturlname = clean_param($context->contexturlname, PARAM_TEXT);
|
||||
$context->shortenedsubject = shorten_text($context->subject, 125);
|
||||
|
||||
if (!empty($context->component) && substr($context->component, 0, 4) == 'mod_') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue