From 928e259745c29324b9a605432b8490a9409adbbb Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Tue, 14 Apr 2026 17:53:24 -0300 Subject: [PATCH] fix: robust internal signal interception and HTML detection --- ui/suite/chat/chat.html | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/ui/suite/chat/chat.html b/ui/suite/chat/chat.html index 09c510e..cbd8f59 100644 --- a/ui/suite/chat/chat.html +++ b/ui/suite/chat/chat.html @@ -302,13 +302,12 @@ function addMessage(sender, content, msgId) { ""; } else { // Check if content has HTML (any tag, including comments) - var hasHtmlTags = new RegExp("<\\\\/?[a-zA-Z][^>]*>|", "i").test(content); + var hasHtmlTags = (content.indexOf("<") !== -1 && /<[a-zA-Z]/.test(content)) || content.indexOf("", "i").test(currentStreamingContent); + var hasHtmlTags = (currentStreamingContent.indexOf("<") !== -1 && /<[a-zA-Z]/.test(currentStreamingContent)) || currentStreamingContent.indexOf("