Skip to content

Commit

Permalink
HTML5 <meta charset="utf-8">
Browse files Browse the repository at this point in the history
  • Loading branch information
lerni committed Nov 26, 2024
1 parent 26d5b11 commit a0ba403
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Control/HTTPResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class HTTPResponse
* @var array
*/
protected $headers = [
"content-type" => "text/html; charset=utf-8",
"charset" => "utf-8",
];

/**
Expand Down
2 changes: 1 addition & 1 deletion src/View/Parsers/HTMLValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function setContent($content)
$content = preg_replace('#</?(html|head(?!er)|body)[^>]*>#si', '', $content);
$html5 = new HTML5(['disable_html_ns' => true]);
$document = $html5->loadHTML(
'<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head>' .
'<html><head><meta charset="utf-8"></head>' .
"<body>$content</body></html>"
);
if ($document) {
Expand Down
2 changes: 1 addition & 1 deletion templates/BlankPage.ss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta charset="utf-8">
<title>$Title</title>
<% base_tag %>
</head>
Expand Down

0 comments on commit a0ba403

Please sign in to comment.