-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check data-* name restrictions #1107
Labels
spec: EPUB 3.x
Impacting the support of EPUB 3.x specifications
status: has PR
The issue is being processed in a pull request
type: improvement
The issue suggests an improvement of an existing feature
Milestone
Comments
rdeltour
added
spec: EPUB 3.x
Impacting the support of EPUB 3.x specifications
status: in discussion
The issue is being discussed by the development team
type: improvement
The issue suggests an improvement of an existing feature
labels
Mar 12, 2020
rdeltour
added
status: ready for implem
The issue is ready to be implemented
and removed
status: in discussion
The issue is being discussed by the development team
labels
Dec 8, 2022
rdeltour
added a commit
that referenced
this issue
Dec 23, 2022
According to HTML: > A custom data attribute is an attribute in no namespace whose name > starts with the string "data-", has at least one character after the > hyphen, is XML-compatible, and contains no ASCII upper alphas. This commit reports invalid `data-*` attributes as errors with a new error code, `HTM-061`. This should be ideally delegated to validator.nu, but we add this check until we fully integrate the HTML checker. Close #1107
This should be ideally delegated to validator.nu, but I added a new check for it until we fully integrate the HTML checker. I don't think validator.nu fully implements the rules btw (it does not complain if the attribute contains upper alphas). But in any case, I don't expect this check to report much new errors with existing content… we'll see! |
rdeltour
added
status: has PR
The issue is being processed in a pull request
and removed
status: ready for implem
The issue is ready to be implemented
labels
Dec 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
spec: EPUB 3.x
Impacting the support of EPUB 3.x specifications
status: has PR
The issue is being processed in a pull request
type: improvement
The issue suggests an improvement of an existing feature
I noticed that we check that data-* attributes are allowed in both XHTML and SVG content documents but we don't appear to be enforcing the naming restrictions in the HTML specification -- specifically that the name can't begin with "xml" or contain upper-ascii characters.
https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes
The text was updated successfully, but these errors were encountered: