Skip to content

support itemscope as a boolean attribute #194

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

Closed
jvanasco opened this issue Jun 19, 2015 · 3 comments
Closed

support itemscope as a boolean attribute #194

jvanasco opened this issue Jun 19, 2015 · 3 comments
Milestone

Comments

@jvanasco
Copy link
Contributor

itemscope should be supported as a boolean attribute.

for reference, schema.org has been pushing it as such (https://schema.org/docs/gs.html#microdata_itemscope_itemtype)

running something through the Tokenizer/Sanitizer will set it to an empty attribute

input: <article itemscope>
output: <article itemscope="">

it looks like this can be handled by editing constants.py and doing the following to enable it on all tags:

booleanAttributes = {
-    "": frozenset(["irrelevant"]),
+    "": frozenset(["irrelevant", "itemscope"]),
@gsnedders
Copy link
Member

Should probably just check the current list of boolean attributes in the spec, really. We're probably missing others too.

@gsnedders gsnedders modified the milestone: 0.999999999 Jun 6, 2016
jvanasco added a commit to jvanasco/html5lib-python that referenced this issue Mar 6, 2017
@willkg willkg modified the milestones: 0.9999999999, 1.0 Oct 3, 2017
willkg added a commit that referenced this issue Oct 31, 2017
added `itemscope` as a boolean attribute (issue #194)
@willkg
Copy link
Contributor

willkg commented Nov 9, 2017

I think this bug is fixed now, but if there are still outstanding things in this bug, please add a comment about what still needs to be done.

Thank you for reporting!

@willkg willkg closed this as completed Nov 9, 2017
@jvanasco
Copy link
Contributor Author

jvanasco commented Nov 9, 2017

thanks for finding/merging my old PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants