diff options
| -rw-r--r-- | emcclib.js | 4 | ||||
| -rw-r--r-- | emccpre.js | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -165,13 +165,13 @@ mergeInto(LibraryManager.library, { * the random seed permalink. */ js_update_permalinks: function(desc, seed) { - desc = UTF8ToString(desc); + desc = encodeURI(UTF8ToString(desc)).replaceAll("#", "%23"); permalink_desc.href = "#" + desc; if (seed == 0) { permalink_seed.style.display = "none"; } else { - seed = UTF8ToString(seed); + seed = encodeURI(UTF8ToString(seed)).replaceAll("#", "%23");; permalink_seed.href = "#" + seed; permalink_seed.style.display = ""; } @@ -515,7 +515,7 @@ function initPuzzle() { // Run the C setup function, passing argv[1] as the fragment // identifier (so that permalinks of the form puzzle.html#game-id // can launch the specified id). - Module.callMain([location.hash]); + Module.callMain([decodeURIComponent(location.hash)]); // And if we get here with everything having gone smoothly, i.e. // we haven't crashed for one reason or another during setup, then |