From cb5f2d9dd7d24bb93defa01aa39a0dfa721df19c Mon Sep 17 00:00:00 2001 From: MeexReay Date: Thu, 20 Mar 2025 01:25:23 +0300 Subject: [PATCH] sanitize html fuck --- sys/terminal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/terminal.js b/sys/terminal.js index 49a5453..6098c27 100644 --- a/sys/terminal.js +++ b/sys/terminal.js @@ -97,8 +97,8 @@ function convertColorCodes(input) { function stripHtml(html) { let tmp = document.createElement("DIV"); - tmp.innerHTML = html; - return tmp.textContent || tmp.innerText || ""; + tmp.innerText = html; + return tmp.innerHTML; } document.onkeydown = (e) => {