From 59f09615941deae7a1034f707a1c9f7ba0556459 Mon Sep 17 00:00:00 2001 From: brvphoenix Date: Fri, 19 Feb 2021 23:54:25 -0800 Subject: [PATCH] WebUI: Properly decode strings --- src/webui/www/private/confirmfeeddeletion.html | 2 +- src/webui/www/private/confirmruleclear.html | 2 +- src/webui/www/private/confirmruledeletion.html | 2 +- src/webui/www/private/newfeed.html | 2 +- src/webui/www/private/newfolder.html | 2 +- src/webui/www/private/rename_feed.html | 2 +- src/webui/www/private/rename_rule.html | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/webui/www/private/confirmfeeddeletion.html b/src/webui/www/private/confirmfeeddeletion.html index e425b2048..ecbc6bd29 100644 --- a/src/webui/www/private/confirmfeeddeletion.html +++ b/src/webui/www/private/confirmfeeddeletion.html @@ -11,7 +11,7 @@ 'use strict'; window.addEvent('domready', () => { - const paths = decodeURIComponent(new URI().getData('paths')).split('|'); + const paths = new URI().getData('paths').split('|'); $('cancelBtn').focus(); $('cancelBtn').addEvent('click', (e) => { new Event(e).stop(); diff --git a/src/webui/www/private/confirmruleclear.html b/src/webui/www/private/confirmruleclear.html index 75314288a..e9640a32d 100644 --- a/src/webui/www/private/confirmruleclear.html +++ b/src/webui/www/private/confirmruleclear.html @@ -11,7 +11,7 @@ 'use strict'; window.addEvent('domready', () => { - const rules = decodeURIComponent(new URI().getData('rules')).split('|'); + const rules = new URI().getData('rules').split('|'); $('cancelBtn').focus(); $('cancelBtn').addEvent('click', (e) => { diff --git a/src/webui/www/private/confirmruledeletion.html b/src/webui/www/private/confirmruledeletion.html index e216a96cc..687636936 100644 --- a/src/webui/www/private/confirmruledeletion.html +++ b/src/webui/www/private/confirmruledeletion.html @@ -11,7 +11,7 @@ 'use strict'; window.addEvent('domready', () => { - const rules = decodeURIComponent(new URI().getData('rules')).split('|'); + const rules = new URI().getData('rules').split('|'); $('cancelBtn').focus(); $('cancelBtn').addEvent('click', (e) => { diff --git a/src/webui/www/private/newfeed.html b/src/webui/www/private/newfeed.html index 2d126cc2e..f23a186dd 100644 --- a/src/webui/www/private/newfeed.html +++ b/src/webui/www/private/newfeed.html @@ -30,7 +30,7 @@ }).activate(); window.addEvent('domready', () => { $('feedURL').focus(); - const path = decodeURIComponent(new URI().getData('path')); + const path = new URI().getData('path'); $('submitButton').addEvent('click', (e) => { new Event(e).stop(); // check field diff --git a/src/webui/www/private/newfolder.html b/src/webui/www/private/newfolder.html index b24a036cc..6abb899a3 100644 --- a/src/webui/www/private/newfolder.html +++ b/src/webui/www/private/newfolder.html @@ -30,7 +30,7 @@ }).activate(); window.addEvent('domready', () => { $('folderName').focus(); - const path = decodeURIComponent(new URI().getData('path')); + const path = new URI().getData('path'); $('submitButton').addEvent('click', (e) => { new Event(e).stop(); // check field diff --git a/src/webui/www/private/rename_feed.html b/src/webui/www/private/rename_feed.html index 2b724b3cc..6fbf63ca3 100644 --- a/src/webui/www/private/rename_feed.html +++ b/src/webui/www/private/rename_feed.html @@ -29,7 +29,7 @@ } }).activate(); window.addEvent('domready', () => { - const oldPath = decodeURIComponent(new URI().getData('oldPath')); + const oldPath = new URI().getData('oldPath'); $('rename').value = oldPath; $('rename').focus(); diff --git a/src/webui/www/private/rename_rule.html b/src/webui/www/private/rename_rule.html index d423ef513..eb346b4df 100644 --- a/src/webui/www/private/rename_rule.html +++ b/src/webui/www/private/rename_rule.html @@ -29,7 +29,7 @@ } }).activate(); window.addEvent('domready', () => { - const oldName = decodeURIComponent(new URI().getData('rule')); + const oldName = new URI().getData('rule'); $('rename').value = oldName; $('rename').focus();