forked from github/pelican
Run tag name through escape filter to avoid invalid HTML
If a tag contains characters like <> or &, we currently generate invalid HTML. This is easily fixed by sending the tag through the jinja escape filter. (This bug is not theoretical, I hit it when using C++ template names for tags, like "boost::variant<>".)
This commit is contained in:
parent
58e817cb0f
commit
a7ca52dee0
1 changed files with 1 additions and 1 deletions
|
|
@ -1,2 +1,2 @@
|
|||
{% if article.tags %}<p>tags: {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> {% endfor %}</p>{% endif %}
|
||||
{% if article.tags %}<p>tags: {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag | escape }}</a> {% endfor %}</p>{% endif %}
|
||||
{% if PDF_PROCESSOR %}<p><a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a></p>{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue