Znote / ZnoteAAC

Developement repository for the Znote AAC project. A website portal to represent and manage your Open Tibia server.
MIT License
145 stars 126 forks source link

Problem character name with spaces #515

Open Emilianenko opened 2 years ago

Emilianenko commented 2 years ago

I can create character with too many spaces between the letters ,before you create it looks ok on the page ,but in database and ingame you can see that all the spaces are there. znote name bug

Emilianenko commented 2 years ago

I solved this problem by adding if(preg_match("/ {2,}/", $_POST['name'])) { $errors[] = 'Invalid character name format. Use only A-Z and no double spaces.'; } in createcharacter.php, but i don't know if this can cause some issue,or if is the right solution.

tysonstrange commented 2 years ago

I would just replace any double or more spaces with a single space and be done with it.

Probably goes hand in hand with #509