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

SGF containing `;)` will break wgo #406

Closed climu closed 4 years ago

climu commented 4 years ago

This game for instance: https://openstudyroom.org/league/games/7061/

produce: image

The sgf contain this line GoDave89: wanna review? ;) Removing the ;) fix it.

Wgo have an a unmerged PR about that here.

I am contemplating removing such characters client side with js before feeding wgo.

climu commented 4 years ago

The js is here:

https://github.com/climu/openstudyroom/blob/d1979e19a4f4b55ff62fbd98baf0ba65e6c683e1/league/templates/league/archives_games.html#L7-L29

But on second thought I think I will do that server side here: https://github.com/climu/openstudyroom/blob/d1979e19a4f4b55ff62fbd98baf0ba65e6c683e1/league/views.py#L641-L664

This was introduced to fix some similar wgo bugs data['sgf'] = sgf.sgf_text.replace(';B[]', "").replace(';W[]', "").

climu commented 4 years ago

https://openstudyroom.org/league/games/7201/

That too ;-)