amp-library icon indicating copy to clipboard operation
amp-library copied to clipboard

The tag 'script' is disallowed except in specific forms

Open shakeel-latif opened this issue 5 years ago • 0 comments

Hi,

    <script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script>
    <script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></script>
    <script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
    <script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js"></script>

i have added these libraries in my amp page.

only v0.js and amp-carousel libraries loading rest gives validation errors. i have added them in head tag.

on line 31

  • The tag 'script' is disallowed except in specific forms. [code: GENERAL_DISALLOWED_TAG category: CUSTOM_JAVASCRIPT_DISALLOWED] ACTION TAKEN: script tag was removed due to validation issues.

on line 33

  • The tag 'script' is disallowed except in specific forms. [code: GENERAL_DISALLOWED_TAG category: CUSTOM_JAVASCRIPT_DISALLOWED] ACTION TAKEN: script tag was removed due to validation issues.

on line 34

  • The attribute 'src' in tag 'amp-mustache extension .js script' is set to the invalid value 'https://cdn.ampproject.org/v0/amp-mustache-0.2.js'. [code: INVALID_ATTR_VALUE category: CUSTOM_JAVASCRIPT_DISALLOWED see: https://www.ampproject.org/docs/reference/extended/amp-mustache.html] ACTION TAKEN: script.src attribute was removed due to validation issues.
  • FINAL ACTION TAKEN: script tag removed from head as it still does not validate. Could not fix tag validation problems.

Even when i try to comment amp-carousel it still add that script in the head.

please guide me what i'm doing wrong. thank

shakeel-latif avatar Apr 17 '19 06:04 shakeel-latif