Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-14137, replace htmlentities with htmlspecialchars

  • Loading branch information...
commit 6b533b45849042d2914ad973c0241f44f47eda07 1 parent d17e23e
dongsheng authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/data/lib.php
4 mod/data/lib.php
View
@@ -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";
Please sign in to comment.
Something went wrong with that request. Please try again.