Skip to content

Commit

Permalink
MDL-14137, replace htmlentities with htmlspecialchars
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsheng committed Apr 9, 2008
1 parent d17e23e commit 6b533b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod/data/lib.php
Expand Up @@ -1812,7 +1812,7 @@ function data_presets_export($course, $cm, $data) {


$presetxml .= "<settings>\n"; $presetxml .= "<settings>\n";
foreach ($settingssaved as $setting) { foreach ($settingssaved as $setting) {
$presetxml .= "<$setting>".htmlentities($data->$setting)."</$setting>\n"; $presetxml .= "<$setting>".htmlspecialchars($data->$setting, ENT_QUOTES)."</$setting>\n";
} }
$presetxml .= "</settings>\n\n"; $presetxml .= "</settings>\n\n";


Expand All @@ -1822,7 +1822,7 @@ function data_presets_export($course, $cm, $data) {
$presetxml .= "<field>\n"; $presetxml .= "<field>\n";
foreach ($field as $key => $value) { foreach ($field as $key => $value) {
if ($value != '' && $key != 'id' && $key != 'dataid') { if ($value != '' && $key != 'id' && $key != 'dataid') {
$presetxml .= "<$key>".htmlentities($value)."</$key>\n"; $presetxml .= "<$key>".htmlspecialchars($value, ENT_QUOTES)."</$key>\n";
} }
} }
$presetxml .= "</field>\n\n"; $presetxml .= "</field>\n\n";
Expand Down

0 comments on commit 6b533b4

Please sign in to comment.