Validator doesn't follow 'get an encoding' in WHATWG Encoding spec
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Start by reading validator.htmlparser.io.Encoding, especially toNameKey, and then inspect validator.encoding.Encoding.forName to determine how the two lookup paths handle invalid labels. Use the reported meta charset examples as regression cases and confirm that labels with spaces, percent escapes, or unsupported suffixes are rejected according to the WHATWG Encoding specification.
Written by the indexing model from the issue text.
Description
'<meta charset="iso-8859- 2">'
or
'<meta charset="iso-8859-%2">'
returns
'Error Internal encoding declaration [...] disagrees with the actual encoding of the document (utf-8).'
While invald encoding name e.g '<meta charset=iso-8859-2a>'
returns
'Error: Internal encoding declaration named an unsupported chararacter encoding iso-8859-2a.'
From the spec, both cases are invalid encoding labels.
https://encoding.spec.whatwg.org/#names-and-labels
It seems
'toNameKey' in validator.htmlparser.io.Encoding
is just skipping invalid characters.
I'm not certain 'forName' in validator.encoding.Encoding
is related or not.
- Dominant language
- Java
- Stars
- 65
- Forks
- 29
- Avg merge
- 11d 21h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from validator/htmlparser
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
validator/htmlparser#98 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
validator/htmlparser#96 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
validator/htmlparser#95 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
validator/htmlparser#87 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
validator/htmlparser#79 ·
All issues in validator/htmlparser
Similar issues
-
bug untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
opensearch-project/ml-commons#5094 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
emitter:client:csharp feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100