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
DISALLOWED_HTML: The attribute 'width' may not appear in tag 'col'.
First of all, maybe it is a bug in AMP that this attribute is not allowed. We should double check that first.
Otherwise, if it is really not allowed, then whitelist sanitizer may be incorrectly merging the width layout attribute among the attributes allowed on an element:
I can see that the problem here goes beyond just col element. The sanitizer is also not stripping width attribute from elements that don't even allow in regular HTML, for example:
I can see that the problem here goes beyond just col element. The sanitizer is also not stripping width attribute from elements that don't even allow in regular HTML
When
post_content
contains HTML such as:This is getting converted to AMP as:
This results in a validation error:
First of all, maybe it is a bug in AMP that this attribute is not allowed. We should double check that first.
Otherwise, if it is really not allowed, then whitelist sanitizer may be incorrectly merging the width layout attribute among the attributes allowed on an element:
https://github.com/Automattic/amp-wp/blob/4e1cd227b10f2fcd6add44a24b078158aad41e53/includes/sanitizers/class-amp-allowed-tags-generated.php#L10573
See here:
https://github.com/Automattic/amp-wp/blob/4e1cd227b10f2fcd6add44a24b078158aad41e53/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php#L1468
layout_allowed_attributes
is not globally-allowed it seems. Maybe that condition needs to be removed.As reported on https://wordpress.org/support/topic/not-a-valid-amp-page-7/
The text was updated successfully, but these errors were encountered: