Skip to content

Validator doesn't follow 'get an encoding' in WHATWG Encoding spec #104

Description

@openandclose

'<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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions