Merge pull request #3 from Arinerron/patch-3

fix unicode bug
This commit is contained in:
Kevin Froman 2017-03-28 00:15:35 -05:00 committed by GitHub
commit 6cead6464d
1 changed files with 2 additions and 2 deletions

View File

@ -156,12 +156,12 @@ $('#go').click(function(){
} }
} }
// convert result to binary // convert result to binary
output = textToBin(input); output = textToBin(encodeURIComponent(input));
$('#output').val(replaceAll(replaceAll(output.toString(), "1", one), "0", zero)); $('#output').val(replaceAll(replaceAll(output.toString(), "1", one), "0", zero));
} }
else else
{ {
var output = binToText(input); var output = decodeURIComponent(binToText(input));
if ($('#useEncrypt').is(':checked')) if ($('#useEncrypt').is(':checked'))
{ {
if (verifyPass('decrypt')) if (verifyPass('decrypt'))