New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to deal with single quotes in locals? #389
Comments
You could replace the single quote with an HTML entity, like <component locals='{
"mediaPlace": "Stade Pierre Mauroy, Villeneuve d’Ascq"
}'>Réserver</component> When using HTML entities, your component should use triple curly braces for outputting variables: - {{ mediaPlace }}
+ {{{ mediaPlace }}} |
Could work, thank you 👍 |
Also, is there a documentation for this? Didn't find it. |
You're right, missed it, need to add it to our docs as well. https://github.com/posthtml/posthtml-expressions#unescaped-locals |
Hello,
I need to display single quotes in my locals values (in my screenshot
Villeneuve d'Ascq
) , but json refuses them (even when escaped).Do you have a solution?
The text was updated successfully, but these errors were encountered: