aboutsummaryrefslogtreecommitdiffstats
path: root/server/templates
diff options
context:
space:
mode:
authorAndrea Lepori <aleporia@gmail.com>2023-01-22 11:28:13 +0100
committerAndrea Lepori <aleporia@gmail.com>2023-01-22 11:28:26 +0100
commit7611b07c2c60261fc594d3b8f22162279e30c7b9 (patch)
tree2ad53f267d704a48fce17da340e5054b727e2a4e /server/templates
parentremove unarchive, enable archive unapproved docs (diff)
downloadscout-subs-7611b07c2c60261fc594d3b8f22162279e30c7b9.tar.gz
scout-subs-7611b07c2c60261fc594d3b8f22162279e30c7b9.zip
fix utf8 encoding of custom parameters
Diffstat (limited to '')
-rw-r--r--server/templates/server/doc_create.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/templates/server/doc_create.html b/server/templates/server/doc_create.html
index 908d1eb..6ba708c 100644
--- a/server/templates/server/doc_create.html
+++ b/server/templates/server/doc_create.html
@@ -200,7 +200,8 @@ $(document).ready(function(){
function preview() {
var param = document.getElementById("param").value;
- var param_base64 = btoa(param);
+ let utf8Encode = new TextEncoder();
+ var param_base64 = btoa(String.fromCharCode.apply(null, new Uint8Array(utf8Encode.encode(param))));
window.open("{%url 'custom_parameters_preview' %}?param=" + param_base64);
}
{% endblock %} \ No newline at end of file