Skip to content
Snippets Groups Projects
Commit b7c21a66 authored by Julian's avatar Julian
Browse files

Fix special character handling

An input text like 'foo"bar' was replaced with 'foo%22bar'.
parent a1577d98
Branches
No related tags found
No related merge requests found
Pipeline #16022 passed
...@@ -39,14 +39,14 @@ ...@@ -39,14 +39,14 @@
$( document ).ready(function() { $( document ).ready(function() {
window.addEventListener('hashchange', function() { window.addEventListener('hashchange', function() {
elText.value = location.hash.substring(1) elText.value = decodeURIComponent(location.hash.substring(1));
generateQR(); generateQR();
}); });
elText = document.getElementById("text"); elText = document.getElementById("text");
elText.oninput = function () { elText.oninput = function () {
window.location.hash = elText.value; window.location.hash = encodeURIComponent(elText.value);
}; };
elText.value = location.hash.substring(1); elText.value = decodeURIComponent(location.hash.substring(1));
generateQR(); generateQR();
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment