Skip to content

Commit

Permalink
Fix escaping in art templates
Browse files Browse the repository at this point in the history
Escape the string after calling upper to avoid distorting character escapes
like & -> &
  • Loading branch information
amCap1712 committed Nov 23, 2024
1 parent d22ea95 commit f650dce
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions listenbrainz/webserver/templates/art/svg-templates/macros.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
{% set hostURL = '' %}
{% endif %}
<a href="{{ host }}/{{ entity }}/{{ mbid }}" target="_blank">
{{ name|upper }}
<title>{{ name }}</title>
{{ name|upper|e }}
<title>{{ name|e }}</title>
</a>
{%- else -%}
{{ name|upper }}
<title>{{ name }}</title>
{{ name|upper|e }}
<title>{{ name|e }}</title>
{%- endif -%}
{% endmacro %}

{% macro render_image_link(entity, image) %}
{% if image.entity_mbid %}
<a href="/{{ entity }}/{{ image.entity_mbid }}" target="_blank">
Expand Down

0 comments on commit f650dce

Please sign in to comment.