App icon indicating copy to clipboard operation
App copied to clipboard

Web - charset not declared

Open dylmye opened this issue 5 years ago • 2 comments

Platform - version:
Firefox latest - Windows 10 Chrome latest - Windows 10

Action Performed (reproducible steps):

  1. Navigate to any page on the expensify.cash domain.

Expected Result: No error message present in console

Actual Result: Following error message is present in console:

The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.

image

Solution: Declaration of the meta 'charset' tag. Typically UTF-8 is used. From MDN:

This attribute declares the document's character encoding. If the attribute is present, its value must be an ASCII case-insensitive match for the string "utf-8", because UTF-8 is the only valid encoding for HTML5 documents. meta elements which declare a character encoding must be located entirely within the first 1024 bytes of the document.

dylmye avatar Dec 31 '20 18:12 dylmye

This seems like a good idea. @dylmye Feel free to create a PR for this. All you'll need to do is add <meta charset="UTF-8"/> just under the opening <head> tag in /web/index.html

roryabraham avatar Jan 06 '21 23:01 roryabraham

cc: @laurenreidexpensify @stephanieelliott

timszot avatar Jan 07 '21 17:01 timszot