geoffmcl/tidy-fork

Attribute boolean value checks

Opened this issue · 4 comments

allowfullscreen is now supported, however there are no checks in place for the validity of this attribute. From the spec it should only be:

// true
allowfullscreen
allowfullscreen=""
allowfullscreen=allowfullscreen

//false
nothing at all

Figured I would go ahead a file this issue from discussions on #6 and let you decide on whether it should be marked as bug or feature ;)

For references:
http://www.w3.org/html/wg/drafts/html/master/single-page.html#attr-iframe-allowfullscreen
http://www.w3.org/html/wg/drafts/html/master/single-page.html#boolean-attribute

Good idea... will think about it...

@geoffmcl after filing this, I think, if you do take on this challenge :), it would make more sense if it were a ticket for all attributes that have this restriction instead of just picking allowfullscreen due to it being a current topic. Or tickets for each one associated to some far off milestone?

I took it as a ticket for ALL boolean attributes, if that is what you mean, but at present tidy does very little 'attribute' value checking... so will take some time to add... so for now flagged it as a 'feature'...

The fix for #6 was just to not flag it as proprietory, so is sort of unrelated...

I'd never used Tidy for attribute checking so wasn't sure if there were more instances like this, thanks for the details on that.

I've also updated the ticket title to reflect a more accurate directive.