Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-34441 always use proper charset in htmlspecialchars() calls

  • Loading branch information...
commit 6b986b7b6aa38725684814633e1b7880423f6c5d 1 parent 4b195fe
@skodak skodak authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/dtl/xml_database_exporter.php
View
4 lib/dtl/xml_database_exporter.php
@@ -48,7 +48,7 @@
public function begin_database_export($version, $release, $timestamp, $description) {
$this->output('<?xml version="1.0" encoding="utf-8"?>');
//TODO add xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" and schema information
- $this->output('<moodle_database version="'.$version.'" release="'.$release.'" timestamp="'.$timestamp.'"'.(empty ($description) ? '' : ' comment="'.htmlspecialchars($description, ENT_QUOTES).'"').'>');
+ $this->output('<moodle_database version="'.$version.'" release="'.$release.'" timestamp="'.$timestamp.'"'.(empty ($description) ? '' : ' comment="'.htmlspecialchars($description, ENT_QUOTES, 'UTF-8').'"').'>');
}
/**
@@ -90,7 +90,7 @@ public function export_table_data(xmldb_table $table, $data) {
if (is_null($value)) {
$this->output('<field name="'.$key.'" value="null" />');
} else {
- $this->output('<field name="'.$key.'">'.htmlspecialchars($value, ENT_NOQUOTES).'</field>');
+ $this->output('<field name="'.$key.'">'.htmlspecialchars($value, ENT_NOQUOTES, 'UTF-8').'</field>');
}
}
$this->output('</record>');
Please sign in to comment.
Something went wrong with that request. Please try again.