fix: use innerText instead of innerHTML #47

Merged
jriou merged 1 commit from tapiron/coller:fix/use_more_secure_innerText_instead_of_innerHTML into main 2025-10-13 17:38:25 +02:00
Showing only changes of commit 09dd88783e - Show all commits

fix: use innerText instead of innerHTML

Thibault Piron 2025-10-13 14:27:31 +00:00
Signed by: tapiron
GPG key ID: AD0AE183112CCC00

View file

@ -48,7 +48,7 @@
if (encryptionKey != "") { if (encryptionKey != "") {
copierCommand += "#" + encryptionKey; copierCommand += "#" + encryptionKey;
} }
document.getElementById("copierCommand").innerHTML = copierCommand; document.getElementById("copierCommand").innerText = copierCommand;
document.getElementById("copier").addEventListener("click", () => { document.getElementById("copier").addEventListener("click", () => {
document.getElementById("copierContainer").style.display = ""; document.getElementById("copierContainer").style.display = "";
}); });
@ -77,7 +77,7 @@
curlCommand += " -XPOST -d '" + payload + "'"; curlCommand += " -XPOST -d '" + payload + "'";
} }
curlCommand += " " + window.location.origin + "/api/note/{{ .Note.ID }}"; curlCommand += " " + window.location.origin + "/api/note/{{ .Note.ID }}";
document.getElementById("curlCommand").innerHTML = curlCommand; document.getElementById("curlCommand").innerText = curlCommand;
document.getElementById("curl").addEventListener("click", () => { document.getElementById("curl").addEventListener("click", () => {
document.getElementById("curlContainer").style.display = ""; document.getElementById("curlContainer").style.display = "";
}); });