mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
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:
parent
64ea4b5edd
commit
bdf31b0919
@ -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>";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user