Search code examples
amp-html

Display Raw HTML from json to AMP page


Currently, I'm trying to implement AMP to an existing Product page and I'm a little bit stuck on displaying some data.

The field which I'm trying to display comes from json and contains Raw HTML (something like the following):

description: { '<h1>section title</h1><p>section description</p>' }

On the AMP documentation I couldn't find any informations about displaying/converting the above string into default HTML tags.

Could you tell me please if there is a way to achieve this with AMP?


Solution

  • You can render raw HTML by using triple curly braces rather than double, for example {{{htmlProperty}}} like {{{description}}}

    <h1> tag is not supported

    For more information