Skip to content

Portal doesn't render magic tags inside <script> tag #728

@cherifGsoul

Description

@cherifGsoul

This was submitted in done-autorender by @MarcGodard

Not sure if this is related to donejs/autorender#160

I am also using the {{#portal (head)}}{{/portal}} in my head and the changes I am making are in the portal.

I am trying to add:

<script type="application/ld+json">{{seoSchema}}</script>

based on adding schema.org schema json to the head of my page. It is recommended to be in the head, but I also tried the body with the same results.

In SSR, when the variable includes the script tag, everything works, until SSR detaches (which the point of schema, this is fine as its only for SEO). If the script tag is in the stache file and the variable like the above, the variable doesn't get processed in either SSR or after it is detached. And actually completely disappears in the body.

Nothing changes in the head or the body when using data-keep from the first link in this issue other than it stays in the body.

I also tried without using portal, and same difference in the head tag.

The magic tags inside script tag are not rendered like is described.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions