ampproject / amp.dev

The AMP Project Website.
https://amp.dev
Other
582 stars 694 forks source link

Relative URL used in AMP4email example code #6776

Open M-J-Robbins opened 6 months ago

M-J-Robbins commented 6 months ago

🐛 Bug Report

Current behavior

The code in the Advanced Server Request example uses a relative URL which is not valid in AMP4Email and shows an error when viewed in the playground.

Error message: The relative URL '/static/inline-examples/data/amp-list-animals.json' for attribute 'src' in tag 'amp-list' is disallowed.

Code in GitHub

Expected behavior/code

Expect example code to pass validation

Reproduction procedure

  1. Open Advanced Server Request example the in playground
  2. Look at error message
dkjonzy2 commented 6 months ago

Fix is to add "https://amp.dev" to the beginning of the url so that the full url is "https://amp.dev/static/inline-examples/data/amp-list-animals.json"

I'll submit a PR

dkjonzy2 commented 6 months ago

PR here waiting review https://github.com/ampproject/amp.dev/pull/6778