mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 14:03:52 +01:00
MDL-13088 - database presets weren't escaping bad chars, causing presets
to break with a rogue < merged from MOODLE_19_STABLE
This commit is contained in:
parent
a03320fcf9
commit
70c003a241
@ -1827,7 +1827,7 @@ function data_presets_export($course, $cm, $data) {
|
||||
|
||||
$presetxml .= "<settings>\n";
|
||||
foreach ($settingssaved as $setting) {
|
||||
$presetxml .= "<$setting>{$data->$setting}</$setting>\n";
|
||||
$presetxml .= "<$setting>".htmlentities($data->$setting)."</$setting>\n";
|
||||
}
|
||||
$presetxml .= "</settings>\n\n";
|
||||
|
||||
@ -1837,7 +1837,7 @@ function data_presets_export($course, $cm, $data) {
|
||||
$presetxml .= "<field>\n";
|
||||
foreach ($field as $key => $value) {
|
||||
if ($value != '' && $key != 'id' && $key != 'dataid') {
|
||||
$presetxml .= "<$key>$value</$key>\n";
|
||||
$presetxml .= "<$key>".htmlentities($value)."</$key>\n";
|
||||
}
|
||||
}
|
||||
$presetxml .= "</field>\n\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user