From 79ea47bc78f58d7c614e93abf3eadb97a001961d Mon Sep 17 00:00:00 2001 From: Shawn Date: Fri, 17 Sep 2021 23:38:48 +0100 Subject: Do not URI encode unless we have to --- index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index 9e44dbe..8763b15 100644 --- a/index.html +++ b/index.html @@ -54,14 +54,14 @@ let email = $userInfoEmail.val().trim(); if (displayName) { - paramGroup['userInfo.displayName'] = '"' + displayName + '"'; + paramGroup['userInfo.displayName'] = '"' + encodeURIComponent(displayName) + '"'; } if (email) { - paramGroup['userInfo.email'] = '"' + email + '"'; + paramGroup['userInfo.email'] = '"' + encodeURIComponent(email) + '"'; } - $codeUserInfo.text(encodeParamGroup(paramGroup).join('&')); + $codeUserInfo.text(flattenParamGroup(paramGroup).join('&')); generator.updateParamGroup('userInfo', paramGroup); } @@ -94,7 +94,7 @@ paramGroup['config.notifications'] = '[]'; } - $codeFeatures.text(encodeParamGroup(paramGroup).join('&')); + $codeFeatures.text(flattenParamGroup(paramGroup).join('&')); generator.updateParamGroup('features', paramGroup); } @@ -153,7 +153,7 @@ paramGroup['config.toolbarButtons'] = (selected.length === 0) ? '[]' : '["' + selected.join('","') + '"]'; } - $codeToolbar.text(encodeParamGroup(paramGroup).join('&')); + $codeToolbar.text(flattenParamGroup(paramGroup).join('&')); generator.updateParamGroup('toolbar', paramGroup); } -- cgit v1.2.3