Lullabot / amp-library

Convert HTML to AMP HTML and report HTML compliance with the AMP HTML specification
Other
381 stars 178 forks source link

DISALLOWED_TAG on amp-google-document-embed #281

Open Rapid0s opened 3 years ago

Rapid0s commented 3 years ago

I am getting an error while parsing html with a pre-applied amp-google-document-embed tag. https://amp.dev/documentation/components/amp-google-document-embed/

Is this normal or I have something wrong with my amp code and it gets red flagged ?

westonruter commented 3 years ago

Can you share a screenshot of where you're seeing that? I tried this into a Custom HTML block:

<amp-google-document-embed src="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" width="8.5" height="12" layout="responsive">
</amp-google-document-embed>

Like so:

image

I get no validation errors.

On an AMP page it renders as expected:

image

westonruter commented 3 years ago

My apologies. I thought this issue was opened for the AMP plugin for WordPress.

In any case, I believe the issue is that amp-library has not been updated to include support for amp-google-document-embed. In the context of the WordPress plugin, we are going to be extracting the PHP logic from the plugin so that it can be used in the Drupal module or any other PHP-based CMS. See https://github.com/ampproject/amp-wp/issues/2315.