🐛 Retrait de certains caractère spéciaux

This commit is contained in:
Kazhnuz 2025-02-12 20:14:06 +01:00
parent 5a3b4e3163
commit d4027dd1e1

View file

@ -14,6 +14,8 @@ function createFilename(prideflag, text, now = false) {
.replaceAll(" ", "_")
.replaceAll("\n", '-')
.normalize("NFD").replace(/[\u0300-\u036f]/g, "")
.replaceAll("&", "and")
.replaceAll("+", "")
.toLowerCase();
return `${prideflag.name.en.toLowerCase()}-${adaptedText}${now?'-now':''}.png`;
}