#444: Re-escape result of the "striptags" jinja filter.

This commit is contained in:
Georg Brandl 2010-06-13 19:50:04 +02:00
parent 732857577e
commit 762741244d
2 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,10 @@
Release 0.6.8 (in development)
==============================
* #444: In templates, properly re-escape values treated with the
"striptags" Jinja filter.
Release 0.6.7 (Jun 05, 2010) Release 0.6.7 (Jun 05, 2010)
============================ ============================

View File

@ -13,7 +13,7 @@
<ul> <ul>
{%- for rellink in rellinks %} {%- for rellink in rellinks %}
<li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}> <li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}" <a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags|e }}"
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a> {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li> {%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
{%- endfor %} {%- endfor %}
@ -100,7 +100,7 @@
{%- else %} {%- else %}
{%- set titlesuffix = "" %} {%- set titlesuffix = "" %}
{%- endif %} {%- endif %}
<title>{{ title|striptags }}{{ titlesuffix }}</title> <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" /> <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" /> <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- if not embedded %} {%- if not embedded %}
@ -140,13 +140,13 @@
{%- endif %} {%- endif %}
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" /> <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
{%- if parents %} {%- if parents %}
<link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" /> <link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}" />
{%- endif %} {%- endif %}
{%- if next %} {%- if next %}
<link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" /> <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
{%- endif %} {%- endif %}
{%- if prev %} {%- if prev %}
<link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" /> <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
{%- endif %} {%- endif %}
{%- endblock %} {%- endblock %}
{%- block extrahead %} {% endblock %} {%- block extrahead %} {% endblock %}