diff --git a/hshcourselist.php b/hshcourselist.php index e5e9e76eb4e8aa8924d7bfd9440aafafa91fc60b..4c0a0c6b3be163355a348682ea3a142789dbb0ec 100644 --- a/hshcourselist.php +++ b/hshcourselist.php @@ -45,5 +45,16 @@ if (!empty($course)) { $courses->close(); } } -header('Content-Type: application/json'); -echo json_encode($output); +header('Content-Type: text/plain'); +echo json_encode(utf8ize($output)); + +function utf8ize($d) { + if (is_array($d)) { + foreach ($d as $k => $v) { + $d[$k] = utf8ize($v); + } + } else if (is_string ($d)) { + return utf8_encode($d); + } + return $d; +} \ No newline at end of file diff --git a/version.php b/version.php index 245052972bdc91b05a8cbab7bf80e7fc2efa1c48..aa23f2642bba8afaad3756f588d5e3fe82de5c64 100644 --- a/version.php +++ b/version.php @@ -25,5 +25,5 @@ $plugin->component = 'block_hshcourselist'; -$plugin->version = 2019041001; // YYYYMMDDHH. +$plugin->version = 2019082301; // YYYYMMDDHH. $plugin->requires = 2016112900; // YYYYMMDDHH. \ No newline at end of file