WebUI: migrate away from inline HTML code

`innerHTML` &  `outerHTML` setter will more or less evaluate the value which could be used to
inject malicious code. So replace them with safer alternatives.

PR #21163.
This commit is contained in:
Chocobo1
2024-08-10 12:55:48 +08:00
committed by GitHub
parent 4570c0ef9e
commit 5afeecbf18
7 changed files with 201 additions and 114 deletions

View File

@@ -67,7 +67,7 @@ window.qBittorrent.PropGeneral ??= (() => {
$("torrent_hash_v1").textContent = "";
$("torrent_hash_v2").textContent = "";
$("save_path").textContent = "";
$("comment").innerHTML = "";
$("comment").textContent = "";
$("private").textContent = "";
piecesBar.clear();
};