MDL-56629 dataformat_html: Adding UTF-8 charset
Also adding the HEAD tag which was missing. (credit goes to Frédéric Massart - FMCorz, thanks!)
This commit is contained in:
@@ -45,7 +45,8 @@ class writer extends \core\dataformat\base {
|
||||
* Write the start of the output
|
||||
*/
|
||||
public function start_output() {
|
||||
echo "<!DOCTYPE html><html>";
|
||||
echo "<!DOCTYPE html><html><head>";
|
||||
echo \html_writer::empty_tag('meta', ['charset' => 'UTF-8']);
|
||||
echo \html_writer::tag('title', $this->filename);
|
||||
echo "<style>
|
||||
html, body {
|
||||
@@ -73,6 +74,7 @@ table {
|
||||
margin: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user