You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AMP plugin makes the default frameborder=0 as seen in the generated example above. What is missing is when the $value is no it should be normalized to 0, and when yes normalized to 1:
This will prevent a validation error from being raised, and it will allow iframe[frameborder=yes] to actually result in amp-iframe[frameborder=1] as the user intends.
The text was updated successfully, but these errors were encountered:
A frameset or frame element has a border if the following algorithm returns true:
If the element has a frameborder attribute whose value is not the empty string and whose first character is either a U+0031 DIGIT ONE (1) character, a U+0079 LATIN SMALL LETTER Y character (y), or a U+0059 LATIN CAPITAL LETTER Y character (Y), then return true.
When adding an
iframe
such as:It gets converted into an
amp-iframe
successfully as:Nevertheless, one AMP validation error is raised in the process:
This validation error is pointless, however, because the
iframe
thatamp-iframe
component generates already providesframeborder=0
:It seems that while HTML allows
no
as a synonym for0
(andyes
for1
), this is not supported by AMP:Apparently this is not even allowed in HTML4, so it could just be a common author mistake (which browsers gracefully handle, and it has been deprecated/removed in HTML5):
The AMP plugin makes the default
frameborder=0
as seen in the generated example above. What is missing is when the$value
isno
it should be normalized to0
, and whenyes
normalized to1
:amp-wp/includes/sanitizers/class-amp-iframe-sanitizer.php
Lines 153 to 158 in 437c335
This will prevent a validation error from being raised, and it will allow
iframe[frameborder=yes]
to actually result inamp-iframe[frameborder=1]
as the user intends.The text was updated successfully, but these errors were encountered: