Escape links to master_doc

This commit is contained in:
Matthias Geier 2020-04-06 20:48:42 +02:00
parent 4caa7d7c37
commit 9dec86e98d
6 changed files with 8 additions and 8 deletions

View File

@ -14,13 +14,13 @@
<div class="header-wrapper" role="banner"> <div class="header-wrapper" role="banner">
<div class="header"> <div class="header">
{%- if logo %} {%- if logo %}
<p class="logo"><a href="{{ pathto(master_doc) }}"> <p class="logo"><a href="{{ pathto(master_doc)|e }}">
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/> <img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
</a></p> </a></p>
{%- endif %} {%- endif %}
{%- block headertitle %} {%- block headertitle %}
<div class="headertitle"><a <div class="headertitle"><a
href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a></div> href="{{ pathto(master_doc)|e }}">{{ shorttitle|e }}</a></div>
{%- endblock %} {%- endblock %}
<div class="rel" role="navigation" aria-label="related navigation"> <div class="rel" role="navigation" aria-label="related navigation">
{%- for rellink in rellinks|reverse %} {%- for rellink in rellinks|reverse %}

View File

@ -7,5 +7,5 @@
:copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details. :license: BSD, see LICENSE for details.
#} #}
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table of Contents') }}</a></h3> <h3><a href="{{ pathto(master_doc)|e }}">{{ _('Table of Contents') }}</a></h3>
{{ toctree() }} {{ toctree() }}

View File

@ -37,7 +37,7 @@
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li> {%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
{%- endfor %} {%- endfor %}
{%- block rootrellink %} {%- block rootrellink %}
<li class="nav-item nav-item-0"><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li> <li class="nav-item nav-item-0"><a href="{{ pathto(master_doc)|e }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
{%- endblock %} {%- endblock %}
{%- for parent in parents %} {%- for parent in parents %}
<li class="nav-item nav-item-{{ loop.index }}"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li> <li class="nav-item nav-item-{{ loop.index }}"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
@ -53,7 +53,7 @@
<div class="sphinxsidebarwrapper"> <div class="sphinxsidebarwrapper">
{%- block sidebarlogo %} {%- block sidebarlogo %}
{%- if logo %} {%- if logo %}
<p class="logo"><a href="{{ pathto(master_doc) }}"> <p class="logo"><a href="{{ pathto(master_doc)|e }}">
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/> <img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
</a></p> </a></p>
{%- endif %} {%- endif %}

View File

@ -8,6 +8,6 @@
:license: BSD, see LICENSE for details. :license: BSD, see LICENSE for details.
#} #}
{%- if display_toc %} {%- if display_toc %}
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table of Contents') }}</a></h3> <h3><a href="{{ pathto(master_doc)|e }}">{{ _('Table of Contents') }}</a></h3>
{{ toc }} {{ toc }}
{%- endif %} {%- endif %}

View File

@ -21,7 +21,7 @@
«&#160;&#160;<a href="{{ prev.link|e }}">{{ prev.title }}</a> «&#160;&#160;<a href="{{ prev.link|e }}">{{ prev.title }}</a>
&#160;&#160;::&#160;&#160; &#160;&#160;::&#160;&#160;
{%- endif %} {%- endif %}
<a class="uplink" href="{{ pathto(master_doc) }}">{{ _('Contents') }}</a> <a class="uplink" href="{{ pathto(master_doc)|e }}">{{ _('Contents') }}</a>
{%- if next %} {%- if next %}
&#160;&#160;::&#160;&#160; &#160;&#160;::&#160;&#160;
<a href="{{ next.link|e }}">{{ next.title }}</a>&#160;&#160;» <a href="{{ next.link|e }}">{{ next.title }}</a>&#160;&#160;»

View File

@ -12,7 +12,7 @@
{%- if logo %} {%- if logo %}
<div class="header" role="banner"> <div class="header" role="banner">
<div class="logo"> <div class="logo">
<a href="{{ pathto(master_doc) }}"> <a href="{{ pathto(master_doc)|e }}">
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/> <img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
</a> </a>
</div> </div>