Fix URL escapes in hrefs

This commit is contained in:
Paweł Romanowski 2019-04-03 19:21:19 +02:00
parent 01bce4ff04
commit 1e013d81e4
4 changed files with 14 additions and 14 deletions

View file

@ -11,11 +11,11 @@
{{ head_macros::head(config=config) }}
{%- if config.generate_rss %}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="rss.xml") }}">
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="rss.xml") | safe }}">
{% endif -%}
{%- if config.extra.favicon %}
<link rel="shortcut icon" type="{{ config.extra.favicon_mimetype | default(value="image/x-icon") }}" href="{{ config.extra.favicon }}">
<link rel="shortcut icon" type="{{ config.extra.favicon_mimetype | default(value="image/x-icon") }}" href="{{ config.extra.favicon | safe }}">
{% endif -%}
{%- block extra_head %}
@ -68,7 +68,7 @@
<div class="pagination__buttons">
{%- if paginator.previous %}
<span class="button previous">
<a href="{{ paginator.previous }}">
<a href="{{ paginator.previous | safe }}">
<span class="button__icon"></span>&nbsp;
<span class="button__text">Newer posts</span>
</a>
@ -76,7 +76,7 @@
{% endif -%}
{%- if paginator.next %}
<span class="button next">
<a href="{{ paginator.next }}">
<a href="{{ paginator.next | safe }}">
<span class="button__text">Older posts</span>&nbsp;
<span class="button__icon"></span>
</a>

View file

@ -5,7 +5,7 @@
</div>
<div>
<!-- &#xFE0E; -- force text style - some devices render this as emoji -->
<a class="read-more button" href="{{ page.permalink }}">
<a class="read-more button" href="{{ page.permalink | safe }}">
<span class="button__text">Read more</span>&nbsp;
<span class="button__icon">&#8617;&#xFE0E;</span>
</a>
@ -37,7 +37,7 @@
<div class="pagination__buttons">
{%- if page.later %}
<span class="button previous">
<a href="{{ page.later.permalink }}">
<a href="{{ page.later.permalink | safe }}">
<span class="button__icon"></span>&nbsp;
<span class="button__text">{{ page.later.title }}</span>
</a>
@ -45,7 +45,7 @@
{% endif %}
{% if page.earlier %}
<span class="button next">
<a href="{{ page.earlier.permalink }}">
<a href="{{ page.earlier.permalink | safe }}">
<span class="button__text">{{ page.earlier.title }}</span>&nbsp;
<span class="button__icon"></span>
</a>
@ -58,7 +58,7 @@
{% macro header(page) %}
<h1 class="post-title"><a href="{{ page.permalink }}">{{ page.title }}</a></h1>
<h1 class="post-title"><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h1>
<div class="post-meta-inline">
{{ post_macros::date(page=page) }}
</div>
@ -74,7 +74,7 @@
{% continue %}
{% endif -%}
<li class="post-list">
<a href="{{ page.permalink }}">
<a href="{{ page.permalink | safe }}">
<span class="post-date">{{ page.date }}</span>
:: <span class="post-list-title">{{ page.title }}</span></a>
{{ post_macros::tags(page=page, short=true) }}
@ -95,7 +95,7 @@
{%- set sep = "&nbsp;" -%}
{% endif -%}
{%- for tag in page.taxonomies.tags %}
<a class="post-tag" href="{{ get_taxonomy_url(kind='tags', name=tag) }}">#{{ tag }}</a>
<a class="post-tag" href="{{ get_taxonomy_url(kind='tags', name=tag) | safe }}">#{{ tag }}</a>
{%- if not loop.last %}{{ sep | safe }}{% endif -%}
{% endfor -%}
</span>

View file

@ -7,7 +7,7 @@
<ul>
{% for term in terms %}
<li class="tag-list">
<a href="{{ term.permalink }}">
<a href="{{ term.permalink | safe }}">
{{ term.name }} ({{ term.pages | length }} post{{ term.pages | length | pluralize }})
</a>
</li>

View file

@ -7,7 +7,7 @@
({{ term.pages | length }} post{{ term.pages | length | pluralize }})
</h1>
<a href="{{ config.base_url }}/tags">
<a href="{{ config.base_url | safe }}/tags">
Show all tags
</a>