Escape article.title throughout jinja templates.

This commit is contained in:
Ethan Dalool 2020-07-29 12:07:10 -07:00
parent f4a5ce7242
commit e2bd6f9a34

View file

@ -343,7 +343,7 @@ def make_tag_page(index, path):
<ul> <ul>
{% for article in articles %} {% for article in articles %}
<li> <li>
<a href="/writing/{{article.web_path}}">{{article.title}}</a> <a href="/writing/{{article.web_path}}">{{article.title|e}}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
@ -408,7 +408,7 @@ def write_writing_index():
<ul> <ul>
{% for article in articles %} {% for article in articles %}
<li> <li>
<a href="{{article.web_path}}">{{article.date}} - {{article.title}}</a> <a href="{{article.web_path}}">{{article.date}} - {{article.title|e}}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
@ -420,7 +420,7 @@ def write_writing_index():
{% for article in articles_edited %} {% for article in articles_edited %}
{% if article.edited and article.edited != article.date %} {% if article.edited and article.edited != article.date %}
<li> <li>
<a href="{{article.web_path}}">{{article.date}} - {{article.title}} ({{article.edited}})</a> <a href="{{article.web_path}}">{{article.date}} - {{article.title|e}} ({{article.edited}})</a>
</li> </li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
@ -444,7 +444,7 @@ def write_rss():
{% for article in articles %} {% for article in articles %}
<item> <item>
<title>{{article.title}}</title> <title>{{article.title|e}}</title>
<link>https://voussoir.net/writing/{{article.web_path}}</link> <link>https://voussoir.net/writing/{{article.web_path}}</link>
<pubDate>{{article.date}}</pubDate> <pubDate>{{article.date}}</pubDate>
<description> <description>