Skip to content

Commit

Permalink
MDL-54010 roles: Specify encoding for escaped export data
Browse files Browse the repository at this point in the history
  • Loading branch information
cameorn1730 committed May 26, 2016
1 parent d50a9a9 commit bb30944
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions admin/roles/classes/preset.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ public static function get_export_xml($roleid) {
$dom->appendChild($top);

$top->appendChild($dom->createElement('shortname', $role->shortname));
$top->appendChild($dom->createElement('name', htmlspecialchars($role->name)));
$top->appendChild($dom->createElement('description', htmlspecialchars($role->description)));
$top->appendChild($dom->createElement('name', htmlspecialchars($role->name, ENT_COMPAT | ENT_HTML401, 'UTF-8')));
$top->appendChild($dom->createElement('description', htmlspecialchars($role->description, ENT_COMPAT | ENT_HTML401,
'UTF-8')));
$top->appendChild($dom->createElement('archetype', $role->archetype));

$contextlevels = $dom->createElement('contextlevels');
Expand Down

0 comments on commit bb30944

Please sign in to comment.