Browse files

MDL-14137, replace htmlentities with htmlspecialchars

  • Loading branch information...
1 parent d17e23e commit 6b533b45849042d2914ad973c0241f44f47eda07 dongsheng committed Apr 9, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/data/lib.php
View
4 mod/data/lib.php
@@ -1812,7 +1812,7 @@ function data_presets_export($course, $cm, $data) {
$presetxml .= "<settings>\n";
foreach ($settingssaved as $setting) {
- $presetxml .= "<$setting>".htmlentities($data->$setting)."</$setting>\n";
+ $presetxml .= "<$setting>".htmlspecialchars($data->$setting, ENT_QUOTES)."</$setting>\n";
}
$presetxml .= "</settings>\n\n";
@@ -1822,7 +1822,7 @@ function data_presets_export($course, $cm, $data) {
$presetxml .= "<field>\n";
foreach ($field as $key => $value) {
if ($value != '' && $key != 'id' && $key != 'dataid') {
- $presetxml .= "<$key>".htmlentities($value)."</$key>\n";
+ $presetxml .= "<$key>".htmlspecialchars($value, ENT_QUOTES)."</$key>\n";
}
}
$presetxml .= "</field>\n\n";

0 comments on commit 6b533b4

Please sign in to comment.