Closed ambar closed 6 years ago
@ctrlplusb https://github.com/sonarwhal/sonar/blob/master/docs/user-guide/rules/meta-charset-utf-8.md
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.Moreover, it is recommended that the meta tag be the first thing in the
. This ensures it is before any content that could be controlled by an attacker, such as aelement, thus, avoiding potential encoding-related security issues (such as the one in old IE).
TIL 😄
Thanks again @ambar! Really appreciate the contribution ❤️
Thanks for this @ambar - is this considered best practice? Do you have any reference material for interests sake?