mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-28 15:31:11 -04:00
[user][bug][cards] fix nonascii username handling
This commit is contained in:
parent
0f16d5970e
commit
ac30fd7c79
@ -64,7 +64,7 @@ const shoot = async (db, mode) => {
|
|||||||
|
|
||||||
for (let {id, locale, username} of profiles) {
|
for (let {id, locale, username} of profiles) {
|
||||||
const cardId = ulid();
|
const cardId = ulid();
|
||||||
let key = `card/${locale}/${username}-${cardId}.png`;
|
let key = `card/${locale}/${encodeURIComponent(username).replace(/'/g, '_')}-${cardId}.png`;
|
||||||
if (mode === 'dark') {
|
if (mode === 'dark') {
|
||||||
key = mode === 'dark' ? key.replace('.png', '-dark.png') : key;
|
key = mode === 'dark' ? key.replace('.png', '-dark.png') : key;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user