Skip to content

Commit

Permalink
URL encode artist link parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Insprill committed May 9, 2023
1 parent cbce281 commit c49caea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 0.x.x:
- Fixed image URL on the artist page not being URL encoded.


## 0.3.0:
- Added a section for the top 5 songs on the artist page.
- Added more information to page titles.
Expand Down
4 changes: 2 additions & 2 deletions templates/artist.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

{% block content %}
<div class="artist">
<img class="artist-image" src="api/image?url={{ artist.image_url|e }}" alt="Thumbnail"/>
<img class="artist-image" src="api/image?url={{ artist.image_url|urlencode }}" alt="Thumbnail"/>
<div class="artist-info">
<p class="artist-name">{{ artist.name|e }}</p>
{% if artist.alternate_names.is_some() && !artist.alternate_names.as_ref().unwrap().is_empty() %}
Expand All @@ -27,7 +27,7 @@
</div>
<div class="artist-socials">
{% for social in artist.socials() %}
<a class="social {{social.brand|e}}" href="https://{{social.brand}}.com/{{social.name_raw|e}}">
<a class="social {{social.brand|e}}" href="https://{{social.brand}}.com/{{social.name_raw|urlencode}}">
<img class="social-icon" src="icon/{{social.brand}}.svg"/>
<p class="social-name">{{ social.name_formatted|e }}</p>
</a>
Expand Down

0 comments on commit c49caea

Please sign in to comment.