climu / openstudyroom

Website for the Open Study Room online go/baduk/weiqi community.
https://openstudyroom.org
GNU General Public License v3.0
67 stars 33 forks source link

Weird unicode characters prevent event tag to be recognized #489

Open ZephyrRaine opened 1 year ago

ZephyrRaine commented 1 year ago

Hello, we detected this bug during our event games (The Shell) for SITS community. In some instances, when the league tag (#vagueX) is parsed from the title, it will be ignored by OSR if it contains invisible unicode characters.

You'll find attached two .sgf games where this bug occurs, (notice the GN parameter of the sgf).

At first glance from @climu it looks like making this line escape more characters should work, by using .isascii() for instance :

l.142 of /league/utils.py

Thank you!

46215909-180-Tigrou49-Gruts(1).txt 46523679-177-Gruts-Leight(1).txt