diff --git a/src/plainui/jinja2/plainui/components/nav.html.j2 b/src/plainui/jinja2/plainui/components/nav.html.j2
index 4a3ec2b74a701c01d43b38a8eee7c98623ba4e85..00ce4ce9275754c1c18c42ef6c64f9175cbd3df8 100644
--- a/src/plainui/jinja2/plainui/components/nav.html.j2
+++ b/src/plainui/jinja2/plainui/components/nav.html.j2
@@ -133,7 +133,7 @@
                  name="q"
                  type="text"
                  placeholder="{{ _('search') }}"
-                 value="{% if search_query is defined %}{{ search_query }}{% endif %}">
+                 value="{%- if search_query is defined -%}{{ search_query }}{%- endif -%}">
         </form>
       {% endif %}
       <div class="hub-top-nav__buttons">
@@ -175,7 +175,7 @@
                  name="q"
                  type="text"
                  placeholder="{{ _('search') }}"
-                 value="{% if search_query is defined %}{{ search_query }}{% endif %}">
+                 value="{%- if search_query is defined -%}{{ search_query }}{%- endif -%}">
         </form>
       </div>
 
diff --git a/src/plainui/jinja2/plainui/fahrplan.html.j2 b/src/plainui/jinja2/plainui/fahrplan.html.j2
index ffee9d5f19cb881a3080fa9a510ab46cf9f6d234..fbc623201df346467b225b23eafdb84ea12000b1 100644
--- a/src/plainui/jinja2/plainui/fahrplan.html.j2
+++ b/src/plainui/jinja2/plainui/fahrplan.html.j2
@@ -16,10 +16,10 @@
           name="set"
           value="t{{ t.slug if t != track else '' }}"
           class=" hub-tag {% if not t.color %}{{ 'hub-tag--secondary-outline' if t != track else 'hub-tag--secondary' }}{% endif %} "
-          style="{% if t.color %} color: {{ calculate_text_colour(t.color) if t == track else ('#eeeeee' if calculate_luminance(t.color) < 140 else t.color) }};
+          style="{%- if t.color -%} color: {{ calculate_text_colour(t.color) if t == track else ('#eeeeee' if calculate_luminance(t.color) < 140 else t.color) }};
                  background-color: {{ t.color if t == track else 'transparent' }};
                  border: {{ 'none' if t == track else '1px solid ' + t.color }};
-                 {% endif %}">{{ t.name }}</button>
+                 {%- endif -%}">{{ t.name }}</button>
 {% endmacro %}
 
 {% block title %}
diff --git a/src/plainui/jinja2/plainui/header.html.j2 b/src/plainui/jinja2/plainui/header.html.j2
index 7578f488120e145437da94cc055d153bab5aedf8..42dd3e968908f5e09bb4a0c4ceac280aed7f25d1 100644
--- a/src/plainui/jinja2/plainui/header.html.j2
+++ b/src/plainui/jinja2/plainui/header.html.j2
@@ -28,7 +28,7 @@
                    name="q"
                    type="text"
                    placeholder="{{ _('search') }}"
-                   value="{% if search_query is defined %} {{ search_query }} {% endif %}">
+                   value="{%- if search_query is defined -%} {{ search_query }} {%- endif -%}">
           </form>
         </li>
         <li class="nav-item dropdown">{{ hbtns.globe() }}</li>
diff --git a/src/plainui/jinja2/plainui/metanav.html.j2 b/src/plainui/jinja2/plainui/metanav.html.j2
index 9e434152de161f1a748002e8d1823d78a98f2c8a..f309fb73182caf9069f50929fad980250eda6b41 100644
--- a/src/plainui/jinja2/plainui/metanav.html.j2
+++ b/src/plainui/jinja2/plainui/metanav.html.j2
@@ -13,12 +13,20 @@
                 gap: 10px">
       {% for item in items %}
         <!-- {{ item.slug }} [enabled={{ item.enabled }}] -->
-        <a href="{% if item.enabled %}{{ item.url }}{% endif %}"
-           {% if not item.enabled %}disabled aria-disabled="true"{% endif %}
-           title="{{ item.title }}"
-           style="{% filter trim %} {% if not item.enabled %}cursor: not-allowed;
-                  pointer-events: none;
-                  {% endif %} {% if active_item == item.slug %}background-color: yellow;{% endif %} {% endfilter %}">
+        <a href="{%- if item.enabled -%}{{ item.url }}{%- endif -%}"  title="{{ item.title }}" {% if not item.enabled %}disabled aria-disabled="true"{% endif %} style="
+           {%- filter trim -%}
+           {%- if not item.enabled -%}
+           cursor:
+           not-allowed
+           pointer-events:
+           none
+           {%- endif -%}
+           {%- if active_item == item.slug -%}
+           background-color:
+           yellow
+           {%- endif -%}
+           {%- endfilter -%}
+           ">
           {% if active_theme() != "dark" %}
             {{ item.graphic_light|safe }}
           {% else %}
diff --git a/src/plainui/jinja2/plainui/static_page_edit.html.j2 b/src/plainui/jinja2/plainui/static_page_edit.html.j2
index aee948651652b58de00ba1d016686475020e5548..f5f7ab15898e78235b6e5b2d55a7438038378767 100644
--- a/src/plainui/jinja2/plainui/static_page_edit.html.j2
+++ b/src/plainui/jinja2/plainui/static_page_edit.html.j2
@@ -61,7 +61,7 @@
           {%- endif %}
         </div>
         <div class="col d-flex justify-content-end">
-          <a href="{{ url('plainui:static_page', page_slug=page_slug) }}{% if lock_id %}?release={{ lock_id }}{% endif %}"
+          <a href="{{ url('plainui:static_page', page_slug=page_slug) }}{%- if lock_id -%}?release={{ lock_id }}{%- endif -%}"
              class="btn btn-dark">{{ _("Cancel") if writeable else _("Back") }}</a>
         </div>
       </div>