From af7c32d3aaa8324dcb18ee713b28f1a21c8cdcdf Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 30 Mar 2022 16:00:54 +0800 Subject: [PATCH] WebUI: remove temporary element --- src/webui/www/private/scripts/misc.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webui/www/private/scripts/misc.js b/src/webui/www/private/scripts/misc.js index 8783fba69..d456648b4 100644 --- a/src/webui/www/private/scripts/misc.js +++ b/src/webui/www/private/scripts/misc.js @@ -169,7 +169,9 @@ window.qBittorrent.Misc = (function() { const escapeHtml = function(str) { const div = document.createElement('div'); div.appendChild(document.createTextNode(str)); - return div.innerHTML; + const escapedString = div.innerHTML; + div.remove(); + return escapedString; } const safeTrim = function(value) {