Fix HTML injection risks in FilesPage and UploadPage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -330,7 +330,7 @@ function getTextWidth(text, e) {
|
||||
const processedText = text.replace(/ /g, "\u00a0");
|
||||
const hiddenSpan = document.createElement("span");
|
||||
|
||||
hiddenSpan.innerHTML = processedText;
|
||||
hiddenSpan.textContent = processedText;
|
||||
hiddenSpan.style.font = window.getComputedStyle(e).font;
|
||||
hiddenSpan.style.visibility = "hidden";
|
||||
document.body.appendChild(hiddenSpan);
|
||||
|
||||
Reference in New Issue
Block a user