Skip to content

Commit 98e6376

Browse files
Fix charset validation to accept both utf-8 and utf8 (all tests passing)
Co-authored-by: NullVoxPopuli <[email protected]>
1 parent b729cb6 commit 98e6376

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/rules/template-no-invalid-meta.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ module.exports = {
4444

4545
// Check for invalid charset value
4646
if (hasCharset && charsetValue) {
47-
const lowerCharset = charsetValue.toLowerCase();
48-
if (lowerCharset !== 'utf8') {
47+
const normalizedCharset = charsetValue.toLowerCase().replaceAll('-', '');
48+
if (normalizedCharset !== 'utf8') {
4949
context.report({
5050
node,
5151
messageId: 'invalidCharset',

0 commit comments

Comments
 (0)