The tag ‘iframe’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-iframe’ : NextJs

  Kiến thức lập trình

We have facing issue on AMP error, please me
error The tag ‘iframe’ may only appear as a descendant of tag ‘noscript’. Did you mean ‘amp-iframe

Custom JavaScript is not allowed in AMP.

export const getAmpSocial = (body, router, liveBlogCheck) => { if ( body ) { body = body.replace(/<iframe[^>]*sandbox="allow-scripts" ?[^>]*>.*?</iframe>/gi, ''); } const wpcomIframe = /<iframes+id="wpcom-iframe-[a-f0-9]+-[0-9]+-[0-9]+"s+width="[^"]+"s+height="[^"]+"s+src="https://embeds.indianexpress.com/protected-iframe/[a-f0-9]+-[0-9]+-[0-9]+"s+scrollings+frameborder="0"s+class="wpcom-protected-iframe">s+</iframe>/g; }

LEAVE A COMMENT