-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't submit draw first games #11
Comments
I am sorry for the lost coins. Firefox reorders HTML when getting it with document.body.innerHTML, and I didn't catch every case. I'm aware parsing HTML with regular expressions is bad idea, but not all browsers have Javascript-exposed HTML parsing =( |
Almost every browser which supports canvas also supports document.querySelector. The only exceptions are Firefox 3 and Opera 9, which do not support typed arrays, so the script would fail on replays anyway. |
Can't use that when getting HTML as plain text with AJAX. Unless the response is temporarily embedded in the current document, which is messy - need to filter out scripts and styles. |
When I try to submit a draw first game using the new canvas, the server responds with HTTP 500. The problem is that the
gameid
is parsed as"([^"
while the page source actually contains the value as it should and your regex matches it correctly when executing it manually.I tried to create a game 3 times without success (wasting my precious coins) until I figured out that this is the script issue. At the same time I can participate in other games and post drawings without problems.
Also parsing HTML with regex is generally a bad idea.
The text was updated successfully, but these errors were encountered: