Skip to content

Commit 86c98da

Browse files
committed
Use decodeURIComponent instead of decodeURI
1 parent 11bd7fe commit 86c98da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

webssh/static/js/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ jQuery(function($){
106106
}
107107

108108

109-
function decode_uri(uri) {
109+
function decode_uri_component(uri) {
110110
try {
111-
return decodeURI(uri);
111+
return decodeURIComponent(uri);
112112
} catch(e) {
113113
console.error(e);
114114
}
@@ -833,7 +833,7 @@ jQuery(function($){
833833

834834

835835
parse_url_data(
836-
decode_uri(window.location.search.substring(1)) + '&' + decode_uri(window.location.hash.substring(1)),
836+
decode_uri_component(window.location.search.substring(1)) + '&' + decode_uri_component(window.location.hash.substring(1)),
837837
form_keys, opts_keys, url_form_data, url_opts_data
838838
);
839839
// console.log(url_form_data);

0 commit comments

Comments
 (0)