From 186f49aedbd82a3374e1530a061552d8236e502d Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 23 Oct 2015 01:34:39 -0700 Subject: [PATCH] encodeURIComponent => encodeURI --- test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test.js b/test.js index 5e92c4a..39fa7dd 100644 --- a/test.js +++ b/test.js @@ -16,9 +16,9 @@ function generate(ke) { var userAccount = $('.js-user-account').value; // obviously don't use this in production, but it's not so bad for the demo - var otpauth = 'otpauth://totp/' - + encodeURIComponent(companyName) + ':' + encodeURIComponent(userAccount) - + '?secret=' + key.replace(/\s+/g, '').toUpperCase() + var otpauth = encodeURI('otpauth://totp/' + + companyName + ':' + userAccount + + '?secret=') + key.replace(/\s+/g, '').toUpperCase() ; var src = 'https://www.google.com/chart?chs=166x166&chld=L|0&cht=qr&chl=' + encodeURIComponent(otpauth);