Ensure SPA HTML files get loaded with UTF-8 encoding

Fixes issues with wrong encoding of the "Loading Funkwhale…" text in index.html
This commit is contained in:
Philipp Wolfer 2022-10-17 14:00:57 +02:00 committed by Georg Krause
parent e3c81ca397
commit 6a91ea91b2
No known key found for this signature in database
GPG Key ID: 2970D504B2183D22
2 changed files with 2 additions and 0 deletions

View File

@ -128,6 +128,7 @@ def get_spa_file(spa_url, name):
response = session.get_session().get(utils.join_url(spa_url, name),)
response.raise_for_status()
response.encoding = "utf-8"
content = response.text
caches["local"].set(cache_key, content, settings.FUNKWHALE_SPA_HTML_CACHE_DURATION)
return content

View File

@ -0,0 +1 @@
Ensure index.html files get loaded with UTF-8 encoding