From 3336effb7248cb237dee0d4e4ea3b9109b8342fc Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Tue, 11 Jul 2017 13:52:24 +0200 Subject: [PATCH] MDL-56629 dataformat_html: Adding UTF-8 charset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also adding the HEAD tag which was missing. (credit goes to Frédéric Massart - FMCorz, thanks!) --- dataformat/html/classes/writer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dataformat/html/classes/writer.php b/dataformat/html/classes/writer.php index 0eaa5559725..a7b60d4ea0e 100644 --- a/dataformat/html/classes/writer.php +++ b/dataformat/html/classes/writer.php @@ -45,7 +45,8 @@ class writer extends \core\dataformat\base { * Write the start of the output */ public function start_output() { - echo ""; + echo ""; + echo \html_writer::empty_tag('meta', ['charset' => 'UTF-8']); echo \html_writer::tag('title', $this->filename); echo " + "; }