From 697fc626cd3556853a84d3b4a22c65f4ed059288 Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Sat, 22 Jun 2019 15:52:19 -0700 Subject: [PATCH] Fix WebUI encoding of special characters --- src/webui/www/private/rename.html | 2 +- src/webui/www/private/scripts/mocha-init.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webui/www/private/rename.html b/src/webui/www/private/rename.html index 5e200d630..d342d04e8 100644 --- a/src/webui/www/private/rename.html +++ b/src/webui/www/private/rename.html @@ -24,7 +24,7 @@ var name = new URI().getData('name'); // set text field to current value if (name) - $('rename').value = escapeHtml(name); + $('rename').value = decodeURIComponent(name); $('rename').focus(); $('renameButton').addEvent('click', function(e) { diff --git a/src/webui/www/private/scripts/mocha-init.js b/src/webui/www/private/scripts/mocha-init.js index a76b8bfdf..822ac28d5 100644 --- a/src/webui/www/private/scripts/mocha-init.js +++ b/src/webui/www/private/scripts/mocha-init.js @@ -452,7 +452,7 @@ initializeWindows = function() { id: 'renamePage', title: "QBT_TR(Rename)QBT_TR[CONTEXT=TransferListWidget]", loadMethod: 'iframe', - contentURL: 'rename.html?hash=' + hashes[0] + '&name=' + row.full_data.name, + contentURL: 'rename.html?hash=' + hash + '&name=' + encodeURIComponent(row.full_data.name), scrollbars: false, resizable: false, maximizable: false,