From 86c98dacc4c59240c05604c1c544f3ab3c3c1e5d Mon Sep 17 00:00:00 2001 From: Sheng Date: Wed, 23 Feb 2022 05:14:31 +0800 Subject: [PATCH] Use decodeURIComponent instead of decodeURI --- webssh/static/js/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webssh/static/js/main.js b/webssh/static/js/main.js index 480447e..5cec096 100644 --- a/webssh/static/js/main.js +++ b/webssh/static/js/main.js @@ -106,9 +106,9 @@ jQuery(function($){ } - function decode_uri(uri) { + function decode_uri_component(uri) { try { - return decodeURI(uri); + return decodeURIComponent(uri); } catch(e) { console.error(e); } @@ -833,7 +833,7 @@ jQuery(function($){ parse_url_data( - decode_uri(window.location.search.substring(1)) + '&' + decode_uri(window.location.hash.substring(1)), + decode_uri_component(window.location.search.substring(1)) + '&' + decode_uri_component(window.location.hash.substring(1)), form_keys, opts_keys, url_form_data, url_opts_data ); // console.log(url_form_data);