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
When adding an <iframe> with loading=lazy attribute, a validation error is raised because of this loading attribute. The AMP_Iframe_Sanitizer should be just omitting the loading attribute entirely when it has a value of lazy since amp-iframe does lazy-loading by default and so it is redundant.
If the value is anything other than lazy (e.g. eager or auto) then a validation error should still be raised so the user is informed of the failed attempt to lazy-load.
Bug Description
When adding an
<iframe>
withloading=lazy
attribute, a validation error is raised because of thisloading
attribute. TheAMP_Iframe_Sanitizer
should be just omitting theloading
attribute entirely when it has a value oflazy
sinceamp-iframe
does lazy-loading by default and so it is redundant.If the value is anything other than
lazy
(e.g.eager
orauto
) then a validation error should still be raised so the user is informed of the failed attempt to lazy-load.Relates to #3938.
Expected Behaviour
No validation error should be raised when
loading=lazy
is added to an<iframe>
.Steps to reproduce
<iframe loading="lazy" src="https://example.com" width="320" height="640"></iframe>
Screenshots
Additional context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Create a Custom HTML block with
<iframe loading="lazy" src="https://example.com" width="320" height="640"></iframe>
Create a Custom HTML block with
<iframe loading="eager" src="https://example.com" width="320" height="640"></iframe>
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: