Gum: HTML-escape tag names when rendering them

This commit is contained in:
Chris Howie
2013-07-18 16:43:49 +00:00
parent 6e0954d76e
commit 59779ffc00
4 changed files with 4 additions and 4 deletions

View File

@@ -28,7 +28,7 @@
{% if article.tags %}
<span>Tagged as : </span>
{% for tag in article.tags %}
<a class="danger label" href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
<a class="danger label" href="{{ SITEURL }}/{{ tag.url }}">{{ tag|e }}</a>
{% endfor %}
{% endif %}
</div>

View File

@@ -33,7 +33,7 @@
{% if tags %}
<ul>
{% for tag in tag_cloud %}
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0 }}</a></li>
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0|e }}</a></li>
{% endfor %}
</ul>
{% endif %}

View File

@@ -1,2 +1,2 @@
{% extends "index.html" %}
{% block title %}{{ SITENAME }} - {{ tag }}{% endblock %}
{% block title %}{{ SITENAME }} - {{ tag|e }}{% endblock %}

View File

@@ -5,7 +5,7 @@
{% for tag in tag_cloud %}
<li class="tag-{{ tag.1 }}">
<a href="{{ SITEURL }}/{{ tag.0.url }}">
<i class="icon-tag icon-large"></i>{{ tag.0 }}
<i class="icon-tag icon-large"></i>{{ tag.0|e }}
</a>
</li>
{% endfor %}