1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-25 10:26:17 +02:00

MDL-60233 mod_assign: Avoid HTML in the item field of external warnings

The item field is defined as PARAM_TEXT (no HTML tags allowed except
for multilang).
Using the s that add quotes to HTML characters we avoid potential Web
Services invalid parameters errors.
This commit is contained in:
Juan Leyva 2017-09-26 11:43:46 +02:00
parent 91cbdda6af
commit 9a62cd02db

@ -62,7 +62,7 @@ class mod_assign_external extends external_api {
$message = 'Unknown warning type.';
}
return array('item'=>$detail,
return array('item' => s($detail),
'itemid'=>$assignmentid,
'warningcode'=>$warningcode,
'message'=>$message);