Skip to content

Commit

Permalink
encode uri component on file name
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed Apr 20, 2024
1 parent 18510b2 commit 4fbc516
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/build-card-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const formatCard = (card) => {
}

const baseImageName = card.image;
card.image = `https://ledercards.netlify.app/cards/${card.product}/${card.locale}/${baseImageName}.webp`;
card.image = `https://ledercards.netlify.app/cards/${card.product}/${
card.locale
}/${encodeURIComponent(baseImageName)}.webp`;

return card;
};
Expand Down

0 comments on commit 4fbc516

Please sign in to comment.