XaverStiensmeier / ilarisdiscordbot

A discord bot for the ilaris ttrpg
GNU General Public License v3.0
0 stars 0 forks source link

Sanitizer warning about regex string #76

Open lukruh opened 3 weeks ago

lukruh commented 3 weeks ago

I got warnings about the regex: return re.sub('[^0-9a-zA-Z\-_]+', '', group_name.replace(" ", "-")).lower() in utility.sanitizer (and in another file that should be replaced by sanitize anyway). \ is an escape character, but - needs no escape. I guess we can remove it? or is it needed for the regex? I'm regex noob btw ;)

lukruh commented 3 weeks ago

talking about sanitizer.. umlaute (ä,ö,ü,ß...) are removed as well.. is this on purpose? With a mainly german audience we should support all german characters I guess.. or if we replace all of them, its even more important to keep the title seperated from the "Slug" (alias, id ...)

XaverStiensmeier commented 3 weeks ago

If they are displayed correctly and cause no issues, I am fine with displaying umlauts. Regarding \, I think it should be \\.

lukruh commented 3 weeks ago

I switched channel names and role names to the actual name (containing umlaute) and it seems to work fine. Will tackle this in #77

XaverStiensmeier commented 1 week ago

Ye discord now apparently allows umlauts.