ソースを参照

Manually escape title of articles and pages

Talha Mansoor 10 年 前
コミット
4d0e547ba1
共有2 個のファイルを変更した2 個の追加2 個の削除を含む
  1. 1 1
      templates/article.html
  2. 1 1
      templates/page.html

+ 1 - 1
templates/article.html

@@ -1,7 +1,7 @@
 {% extends 'base.html' %}
 
 {% block title %}
-{{ article.title|striptags }} {%if article.subtitle %} - {{ article.subtitle }} {% endif %} · {{ super() }}
+{{ article.title|striptags|e }} {%if article.subtitle %} - {{ article.subtitle|striptags|e }} {% endif %} · {{ super() }}
 {% endblock title %}
 
 {% block head_description %}

+ 1 - 1
templates/page.html

@@ -1,7 +1,7 @@
 {% extends 'base.html' %}
 
 {% block title %}
-{{ page.title }} {%if page.subtitle %} - {{ page.subtitle }} {% endif %} · {{ super() }}
+{{ page.title|striptags|e }} {%if page.subtitle %} - {{ page.subtitle|striptags|e }} {% endif %} · {{ super() }}
 {% endblock title %}
 
 {% block head_description %}