Open cherifGsoul opened 4 years ago
Seems script tags are not processed in can-view-parser
.
https://github.com/canjs/can-view-parser/blob/e42c647f2f2a4304657e74efb70c424fb5616197/can-view-parser.js#L249
@cherifGsoul Is it possible to add a type to it so it will process it?
@MarcGodard I don't think adding type will fix it, however after I discussed the issue with the team @bmomberger-bitovi pointed a good solution to make your use case working:
<script type="application/ld+json" innerHTML:from="seoSchema"></script>
This renders the property as expected and I checked it with portals in donejs example and it works fine, let us know if this works for you.
@cherifGsoul Awesome, I will try that. Thanks @bmomberger-bitovi
@MarcGodard did the suggested solution work for you?
@cherifGsoul Actually, it did not, because I am using a helper function.
<script type="application/ld+json" innerHTML:from="l10n ('pageNewsSchema')"></script>
The helper is like a look up, looks up the variable with locales and gives that language version of it.
This was submitted in
done-autorender
by @MarcGodardThe magic tags inside script tag are not rendered like is described.