Only convert to UTF8 if we aren't running under UTF8.
Please, test this is correct, thanks!
This commit is contained in:
+3
-1
@@ -1255,7 +1255,9 @@ class hotpot_xml_tree {
|
||||
if (empty($str)) {
|
||||
$this->xml = array();
|
||||
} else {
|
||||
$str = utf8_encode($str);
|
||||
if (empty($CFG->unicodedb)) {
|
||||
$str = utf8_encode($str);
|
||||
}
|
||||
$this->xml = xmlize($str, 0);
|
||||
}
|
||||
$this->xml_root = $xml_root;
|
||||
|
||||
@@ -472,7 +472,9 @@ class hotpot_xml_tree {
|
||||
// encode htmlentities in JCloze
|
||||
$this->encode_cdata($str, 'gap-fill');
|
||||
// encode as utf8
|
||||
$str = utf8_encode($str);
|
||||
if (empty($CFG->unicodedb)) {
|
||||
$str = utf8_encode($str);
|
||||
}
|
||||
// xmlize (=convert xml to tree)
|
||||
$this->xml = xmlize($str, 0);
|
||||
}
|
||||
|
||||
@@ -387,7 +387,11 @@ function handle_questions_media(&$questions, $path, $courseid) {
|
||||
$smarty->assign('course', $course);
|
||||
$smarty->assign('lang', $this->lang);
|
||||
$expout = $smarty->fetch('imsmanifest.tpl');
|
||||
echo utf8_encode($expout);
|
||||
if (!empty($CFG->unicodedb)) {
|
||||
echo $expout;
|
||||
} else {
|
||||
echo utf8_encode($expout);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user