From 9f91331da1440c8231c135be6bcdbef47bb53c17 Mon Sep 17 00:00:00 2001 From: daformat Date: Wed, 14 May 2014 19:06:45 +0200 Subject: [PATCH] Add encode URI component to sharing --- js/game_engine/share.js | 2 +- js/scene-decrypter.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/game_engine/share.js b/js/game_engine/share.js index f470b37..7c4bc2f 100644 --- a/js/game_engine/share.js +++ b/js/game_engine/share.js @@ -223,7 +223,7 @@ function createCryptedMessage() { var ternary_message = string_to_ternary(text); // Url encrypted message - var total_crypt_message = original_text.toBase64(); + var total_crypt_message = encodeURIComponent(original_text.toBase64()); var cipher_message = original_text[0] + original_text[1] + original_text[2]; diff --git a/js/scene-decrypter.js b/js/scene-decrypter.js index 824a80d..0f49c92 100644 --- a/js/scene-decrypter.js +++ b/js/scene-decrypter.js @@ -606,7 +606,7 @@ $(function(){ var keyInfo = keyInfoDeCrypt(dataElement[1]); // url encrypted message - currentGame.cryptedMessage = dataElement[0]; + currentGame.cryptedMessage = decodeURIComponent(dataElement[0]); var keyInfoElement = keyInfo.split('|');