Closed ExtremeCoolDude closed 3 years ago
So with URL variables they are separated by an ampersand, so Its no surprise having an ampersand in the pgn will cause an error. The only way I can think to fix it is to replace it with something else and then re-replace it in the html files. Kind of dirty but what can you do.
I will check to see if other characters trip it, like an Equals sign perhaps
Ok so a clean solution exists. Simply encodeURIComponent instead of encodeURI solves this. this is what I get for trying to use code without reading what it actually does
fixed
This will result in pegparser syntax error :
console.log(pgn)
:Everything after
&
character is truncated. Not sure what's causing it