summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-06-23 14:01:14 +0200
committerAlan Pearce2023-06-23 14:04:53 +0200
commit805b34faf0bbdaf135e16072b8dd9153a24368ad (patch)
treee4fe3dfe9c77cb653d03170d6e5f137fcdb96a81
parentfe119b75f2b3f8f3ba8c2367c3ec768538edc695 (diff)
downloadwebsite-805b34faf0bbdaf135e16072b8dd9153a24368ad.tar.lz
website-805b34faf0bbdaf135e16072b8dd9153a24368ad.tar.zst
website-805b34faf0bbdaf135e16072b8dd9153a24368ad.zip
Fix overzealous URL encoding
-rw-r--r--themes/bear/templates/header.html2
-rw-r--r--themes/bear/templates/nav.html6
-rw-r--r--themes/bear/templates/section.html4
-rw-r--r--themes/bear/templates/taxonomy_single.html2
4 files changed, 7 insertions, 7 deletions
diff --git a/themes/bear/templates/header.html b/themes/bear/templates/header.html
index d08ea29..18b2318 100644
--- a/themes/bear/templates/header.html
+++ b/themes/bear/templates/header.html
@@ -1,7 +1,7 @@
 <a class="skip" href="#content">Skip to main content</a>
 <header>
   <h2>
-    <a href="{{ config.base_url }}" class="title">
+    <a href="{{ config.base_url | safe }}" class="title">
       {{ config.title }}
     </a>
   </h2>
diff --git a/themes/bear/templates/nav.html b/themes/bear/templates/nav.html
index e006ab1..cf0d9b7 100644
--- a/themes/bear/templates/nav.html
+++ b/themes/bear/templates/nav.html
@@ -1,10 +1,10 @@
-<a href="{{ config.base_url }}">Home</a>
+<a href="{{ config.base_url | safe }}">Home</a>
 {%- if config.extra.main_menu %}
   {%- for item in config.extra.main_menu %}
     {%- if item.url is matching("https?://") %}
-      <a href="{{ item.url }}">{{ item.name }}</a>
+      <a href="{{ item.url | safe }}">{{ item.name }}</a>
     {%- else %}
-      <a href="{{ get_url(path=item.url )}}">{{ item.name }}</a>
+      <a href="{{ get_url(path=item.url) }}">{{ item.name }}</a>
     {%- endif %}
   {%- endfor %}
 {%- endif -%}
diff --git a/themes/bear/templates/section.html b/themes/bear/templates/section.html
index f7567f2..c7f80de 100644
--- a/themes/bear/templates/section.html
+++ b/themes/bear/templates/section.html
@@ -16,7 +16,7 @@
               {{ page.date | date(format=config.extra.date_format) }}
             </time>
           </span>
-          <a href="{{ page.permalink }}">{{ page.title }}</a>
+          <a href="{{ page.path | urlencode | safe }}">{{ page.title }}</a>
         </li>
         {% else %}
         <li>
@@ -28,7 +28,7 @@
       <div>
         {% set tags = get_taxonomy(kind="tags") %}
         {% for post in tags.items %}
-          <a href="{{ post.permalink }}">#{{ post.name }}</a>&nbsp;
+          <a href="{{ post.path | urlencode | safe }}">#{{ post.name }}</a>
         {% endfor %}
       </div>
     </small>
diff --git a/themes/bear/templates/taxonomy_single.html b/themes/bear/templates/taxonomy_single.html
index 4fade3f..2798f94 100644
--- a/themes/bear/templates/taxonomy_single.html
+++ b/themes/bear/templates/taxonomy_single.html
@@ -22,7 +22,7 @@
               {{ page.date | date(format=config.extra.date_format) }}
             </time>
           </span>
-          <a href="{{ page.permalink }}">{{ page.title }}</a>
+          <a href="{{ page.path | urlencode | safe }}">{{ page.title }}</a>
         </li>
       {% else %}
         <li>