From e6cc0ef44f3e3157bf78d2f43f80d252d7f0d409 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Thu, 18 May 2023 19:59:10 -0300 Subject: [PATCH] Replace the character with the `\e` escape sequence Signed-off-by: RD WebDesign --- scripts/pi-hole/php/gravity.sh.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pi-hole/php/gravity.sh.php b/scripts/pi-hole/php/gravity.sh.php index 0abf5ec8..cd24090a 100644 --- a/scripts/pi-hole/php/gravity.sh.php +++ b/scripts/pi-hole/php/gravity.sh.php @@ -24,8 +24,8 @@ function echoEvent($datatext) // Detect ${OVER} and replace it with something we can safely transmit // This allows every line (including progress and error messages) to be shown on the page - // Replace "\r" (generated by gravity.sh) with "<------" - $datatext = str_replace("\r", '<------', $datatext); + // Replace "\r\e[K" ("CR+ESC+[" generated by gravity.sh) with "<------" + $datatext = str_replace("\r\e[K", '<------', $datatext); // Replace "\r" generated by "pihole-FTL gravity parseList" command $datatext = str_replace("\r", '<------', $datatext);