While updating my site to use Markata’s new configurable head I ran into some escaping issues. Things like single quotes would cause jinja to fail as it was closing quotes that it shouldnt have.
Jinja comes with a handy utility for escaping strings. I definitly tried to over-complicate this before realizing. You can just pipe your variables into e to escape them. This has worked pretty flawless at solving some jinja issues for me.
<p> {{ title|e }} </p>
Creating meta tags in Markata #
The issue I ran into was when trying to setup meta tags with the new configurable head, some of my titles have single quotes in them. This is what I put in my markata.toml to create some meta tags.
[[markata.head.meta]] name = "og:title" content = "{{ title }}"
Using my article titles like this ended up causing this syntax error when not escaped.
...


