diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2022-10-21 09:55:35 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2022-10-21 10:28:01 +0100 |
| commit | 0197ca43594fbe7cd44377078296720ac7499887 (patch) | |
| tree | 6996c42d75aff22d53b6eb48aa8dbc23bbbb1f4d /html | |
| parent | 373dadacc06210197e3d68c55a6d611126915120 (diff) | |
| download | puzzles-0197ca43594fbe7cd44377078296720ac7499887.zip puzzles-0197ca43594fbe7cd44377078296720ac7499887.tar.gz puzzles-0197ca43594fbe7cd44377078296720ac7499887.tar.bz2 puzzles-0197ca43594fbe7cd44377078296720ac7499887.tar.xz | |
js: Percent-encode game IDs in URLs and decode them again on input
This is necessary to allow all random seeds to round-trip properly.
It's probably not currently necessary for descriptive game IDs, but it
won't hurt.
I've deliberately gone for encoding only those characters that are not
valid in fragment identifiers to minimise the ugliness of the generated
URLs. For slightly interesting historical reasons, '#' is not valid in
a fragment identifier, so all random seed links end up a little bit
ugly.
Diffstat (limited to 'html')
0 files changed, 0 insertions, 0 deletions