From 7611b07c2c60261fc594d3b8f22162279e30c7b9 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Sun, 22 Jan 2023 11:28:13 +0100 Subject: fix utf8 encoding of custom parameters --- server/templates/server/doc_create.html | 3 ++- version.txt | 2 +- 2 files changed, 3 insertions(+), 2 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 diff --git a/version.txt b/version.txt index 9736897..9553714 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ version=0.6 -rev=13 +rev=14 -- cgit v1.2.1