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("