]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1428166 - Move <meta charset> to start of <head>
authorEdgaras <edgaras.janusauskas@gmail.com>
Thu, 4 Jan 2018 21:57:56 +0000 (23:57 +0200)
committerDylan William Hardison <dylan@hardison.net>
Thu, 4 Jan 2018 21:57:56 +0000 (16:57 -0500)
The <meta> element declaring the encoding must be inside the <head> element and within the first 1024 bytes of the HTML as some browsers only look at those bytes before choosing an encoding.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset

template/en/default/global/header.html.tmpl

index 5d00b721611f7be78bd23a9247d31a99fef4de3f..aa6d1cecc5933b8919047b18948968e207e25393 100644 (file)
 <!DOCTYPE html>
 <html lang="en">
   <head>
+    [% IF Param('utf8') %]
+      <meta charset="UTF-8">
+    [% END %]
+
     [%- js_BUGZILLA = {
             param => {
                 maxusermatches => Param('maxusermatches'),
         id="bugzilla-global" data-bugzilla="[% json_encode(js_BUGZILLA) FILTER html %]">
     <title>[% title %]</title>
 
-    [% IF Param('utf8') %]
-      <meta charset="UTF-8">
-    [% END %]
-
     [% IF no_index %]
       <meta name="robots" content="noindex">
     [% END %]