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) }} {{ head_macros::head(config=config) }}
{%- if config.generate_rss %} {%- 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 -%} {% endif -%}
{%- if config.extra.favicon %} {%- 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 -%} {% endif -%}
{%- block extra_head %} {%- block extra_head %}
@ -68,7 +68,7 @@
<div class="pagination__buttons"> <div class="pagination__buttons">
{%- if paginator.previous %} {%- if paginator.previous %}
<span class="button previous"> <span class="button previous">
<a href="{{ paginator.previous }}"> <a href="{{ paginator.previous | safe }}">
<span class="button__icon"></span>&nbsp; <span class="button__icon"></span>&nbsp;
<span class="button__text">Newer posts</span> <span class="button__text">Newer posts</span>
</a> </a>
@ -76,7 +76,7 @@
{% endif -%} {% endif -%}
{%- if paginator.next %} {%- if paginator.next %}
<span class="button 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__text">Older posts</span>&nbsp;
<span class="button__icon"></span> <span class="button__icon"></span>
</a> </a>

View file

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

View file

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

View file

@ -7,10 +7,10 @@
({{ term.pages | length }} post{{ term.pages | length | pluralize }}) ({{ term.pages | length }} post{{ term.pages | length | pluralize }})
</h1> </h1>
<a href="{{ config.base_url }}/tags"> <a href="{{ config.base_url | safe }}/tags">
Show all tags Show all tags
</a> </a>
{{ post_macros::list_posts(pages=term.pages) }} {{ post_macros::list_posts(pages=term.pages) }}
</div> </div>
{% endblock content %} {% endblock content %}