From e3fcaa492c06e442a93e75abb98859c8ea0bfe9d Mon Sep 17 00:00:00 2001 From: Ben Davies <34197615+Kaiepi@users.noreply.github.com> Date: Sun, 23 Feb 2020 04:13:56 -0400 Subject: [PATCH] Properly set the encoding to UTF-8 on all HTML pages (#1467) This adds the BOM to all HTTP pages as per the HTML5 spec and ensures all pages use UTF-8 as their meta charset (which is still kept for compatibility with older browsers). --- action.php | 2 +- crossprotocol.html | 4 ++-- desktop/index.html | 3 ++- index.template.html | 4 ++-- preactalpha.template.html | 4 ++-- recoverteams.html | 3 ++- style/hpbartest.html | 4 ++-- testclient-beta.html | 4 ++-- testclient.html | 4 ++-- 9 files changed, 17 insertions(+), 15 deletions(-) diff --git a/action.php b/action.php index ddb4d7431..22e4b0150 100644 --- a/action.php +++ b/action.php @@ -10,7 +10,7 @@ License: GPLv2 or later error_reporting(E_ALL); if (@$_GET['act'] === 'dlteam') { - header("Content-Type: text/plain"); + header("Content-Type: text/plain; charset=utf-8"); if (substr(@$_SERVER['HTTP_REFERER'], 0, 32) !== 'https://play.pokemonshowdown.com') { // since this is only to support Chrome on HTTPS, we can get away with a very specific referer check die("access denied"); diff --git a/crossprotocol.html b/crossprotocol.html index 36394576b..91506a17e 100644 --- a/crossprotocol.html +++ b/crossprotocol.html @@ -1,5 +1,5 @@ - - + +