Skip to content

Commit

Permalink
Do not escape urls where it is not needed
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Borsuk <[email protected]>
  • Loading branch information
biodranik committed Dec 24, 2022
1 parent 5cf6282 commit 80153d7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{%- endif %}
{%- endif %}
<meta property="og:image" content="{{ get_url(path=preview_image) }}">
<meta property="og:url" content="{{ current_url }}">
<meta property="og:url" content="{{ current_url | safe }}">
<meta property="og:type" content="website">
<meta property="og:title" content="{{ resource.title }}">
{%- if resource.description -%}
Expand Down
2 changes: 1 addition & 1 deletion templates/bottom_menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% endif %}

{% if page.extra.menu_title %}
{% if resource.path != page.path %}<a href="{{ page.permalink | replace(from=config.base_url, to="") }}">{% endif %}
{% if resource.path != page.path %}<a href="{{ page.permalink | replace(from=config.base_url, to="") | safe }}">{% endif %}
<span>{{ page.extra.menu_title }}</span>
{%- if resource.path != page.path %}</a>{% endif %}
&nbsp;
Expand Down
2 changes: 1 addition & 1 deletion templates/language_selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{% for translation in resource.translations | sort(attribute="lang") %}
{% if lang != translation.lang %}
<li class="lang-menu-item" role="menuitem">
<a class="lang-menu-link" onclick="return onLanguageClick('{{ translation.lang }}');" href="{{ translation.permalink | replace(from=config.base_url, to="") }}">
<a class="lang-menu-link" onclick="return onLanguageClick('{{ translation.lang }}');" href="{{ translation.permalink | replace(from=config.base_url, to="") | safe }}">
{{ trans(key="language", lang=translation.lang) }}
</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions templates/top_menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% set langPathPrefix = '/' ~ lang %}
{% endif %}
<nav id="menu" role="navigation">
<a href="{{ langPathPrefix }}/"><span class="top_menu_logo"></span></a>
<a href="{{ langPathPrefix | safe }}/"><span class="top_menu_logo"></span></a>
<span>
{% for page in [
get_section(path="news/_index.md"),
Expand All @@ -20,7 +20,7 @@
{% endif %}
{% endif %}
<span class="top_menu_{{ page.path | split(pat="/") | reverse | nth(n=1) }} top_menu_item{% if page.path != resource.path %}">
<a href="{{ page.permalink | replace(from=config.base_url, to="") }}">{% else %}_active">{% endif %}
<a href="{{ page.permalink | replace(from=config.base_url, to="") | safe }}">{% else %}_active">{% endif %}
<span>{{ page.extra.menu_title }}</span>
{%- if page.path != resource.path %}</a>{% endif %}
</span>
Expand Down

0 comments on commit 80153d7

Please sign in to comment.