From 7af0cda04eb81be4a75846118f30bc2a8bcad5bf Mon Sep 17 00:00:00 2001 From: SpeedPartner <376705740@qq.com> Date: Sat, 6 May 2023 22:20:52 +0800 Subject: [PATCH] Replace ASCII symbols that cannot be displayed in the logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before: INFO[2023-05-06 01:46:19] build index for: [/] After: 🔧[36mINFO🔧[0m[2023-05-06 01:46:19] build index for: [/] --- luci-app-alist/luasrc/view/alist/alist_log.htm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/luci-app-alist/luasrc/view/alist/alist_log.htm b/luci-app-alist/luasrc/view/alist/alist_log.htm index 737179e..5ec4a78 100644 --- a/luci-app-alist/luasrc/view/alist/alist_log.htm +++ b/luci-app-alist/luasrc/view/alist/alist_log.htm @@ -17,7 +17,9 @@ function(x, data) { if(x && x.status == 200) { var log_textarea = document.getElementById('log_textarea'); - log_textarea.innerHTML = x.responseText; + var str = x.responseText; + var logs = str.replace(//g, "🔧"); + log_textarea.innerHTML = logs; if (!scrolled) { log_textarea.scrollTop = log_textarea.scrollHeight; scrolled = true;