iframe sandbox with no value

For technical support and bug reports for all editions of CSS HTML Validator, including htmlval for Linux and Mac.
TomHTML
Rank III - Intermediate
Posts: 75
Joined: Sun Feb 04, 2018 10:19 am

iframe sandbox with no value

Post by TomHTML »

I have this iframe element:

Code: Select all

<iframe sandbox="" class="ic-iframe" title="Check Social Share Images" tabindex="-1" src="https://example.com"></iframe>
The validator reports:
The "sandbox" attribute for this "iframe" element (with class="lv-iframe") has an empty or missing value. The expected value is one of the following: an alphanumeric string, no value, or a string.
However, the MDN entry on the sandbox attribute of iframes states that it can be empty to apply all restrictions (on https://developer.mozilla.org/en-US/doc ... ent/iframe):
sandbox
Applies extra restrictions to the content in the frame. The value of the attribute can either be empty to apply all restrictions, or space-separated tokens to lift particular restrictions:
[various attribute values are then listed]
Wouldn't the Validator therefore be incorrect in reporting this as an error?

Many thanks,
Tom
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: iframe sandbox with no value

Post by Albert Wiersch »

Hi Tom,

Thank you for reporting this. It will be fixed in the next update of CSS HTML Validator 2021.

Or you can download the updated config file for 2021/v21 here:
https://www.htmlvalidator.com/2021/htmlvalV210cfg.zip

And for the latest config file for 2020/v20:
https://www.htmlvalidator.com/2020/htmlvalV200cfg.zip

Please see the "readme" file in the above ZIP file for installation instructions.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
TomHTML
Rank III - Intermediate
Posts: 75
Joined: Sun Feb 04, 2018 10:19 am

Re: iframe sandbox with no value

Post by TomHTML »

Thanks! That seems to fix it.