summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorShawn <shawn@qwil.io>2021-09-17 23:38:48 +0100
committerShawn <shawn@qwil.io>2021-09-17 23:38:48 +0100
commit79ea47bc78f58d7c614e93abf3eadb97a001961d (patch)
tree6227e5e6379a57156ab2c30f17edbcde8493af87 /index.html
parentb1dcd02a3122e4ace4d6d1faa61a9efd321d3335 (diff)
Do not URI encode unless we have to
Diffstat (limited to 'index.html')
-rw-r--r--index.html10
1 files changed, 5 insertions, 5 deletions
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);
}