Components docs, says props objects should be encoded.
I have a dynamic object that could have special characters in some keys. How is the best way to send this values as props on a component, without needing to remove the characters?
Example:
[{
"product": "Lorem TV 15'' LED",
"link": "http://link.to/product",
},
{
"product": "Ipsum Airfryer",
"link": "http://link.to/product-2",
}]
<each loop="item in {{page.data}}">
<x-link data={{item}} />
</each>
<script props>
module.exports = {
data: props.data
}
</script>
<a href={{data.link}}>{{data.product}}</a>
Airfryer renders normally, but TV don't, it breaks after apostrophe. Tried using html entities but it just don't render and unicode \u0027 also breaks on render, although other unicodes works as \u00a0 and \u00e2.
Components docs, says props objects should be encoded.
I have a dynamic object that could have special characters in some keys. How is the best way to send this values as props on a component, without needing to remove the characters?
Example:
Airfryer renders normally, but TV don't, it breaks after apostrophe. Tried using html entities but it just don't render and unicode
\u0027also breaks on render, although other unicodes works as\u00a0and\u00e2.