Skip to content
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

Block API: Validation should be case insensitive #18666

Closed
aduth opened this issue Nov 21, 2019 · 0 comments · Fixed by #19207
Closed

Block API: Validation should be case insensitive #18666

aduth opened this issue Nov 21, 2019 · 0 comments · Fixed by #19207
Assignees
Labels
[Feature] Block API API that allows to express the block paradigm. [Feature] Block Validation/Deprecation Handling block validation to determine accuracy and deprecation [Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@aduth
Copy link
Member

aduth commented Nov 21, 2019

The isEquivalentHTML function currently returns false for the following comparison:

isEquivalentHTML( '<DIV CLASS="foo"></DIV>', '<div class="foo"></div>' );
// false

This should return true, as both the tag name and attribute name should be considered case-insensitive.

References:

Tags contain a tag name, giving the element's name. HTML elements all have names that only use ASCII alphanumerics. In the HTML syntax, tag names, even those for foreign elements, may be written with any mix of lower- and uppercase letters that, when converted to all-lowercase, matches the element's tag name; tag names are case-insensitive.

https://html.spec.whatwg.org/multipage/syntax.html#elements-2

In the HTML syntax, attribute names, even those for foreign elements, may be written with any mix of ASCII lower and ASCII upper alphas. [...] There must never be two or more attributes on the same start tag whose names are an ASCII case-insensitive match for each other.

https://html.spec.whatwg.org/multipage/syntax.html#attributes-2

@aduth aduth added [Type] Task Issues or PRs that have been broken down into an individual action to take [Feature] Block API API that allows to express the block paradigm. [Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f [Feature] Block Validation/Deprecation Handling block validation to determine accuracy and deprecation labels Nov 21, 2019
@gziolo gziolo added the Needs Dev Ready for, and needs developer efforts label Nov 21, 2019
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Feature] Block Validation/Deprecation Handling block validation to determine accuracy and deprecation [Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants