fix: final lint resolution for HTML detection
Some checks failed
BotUI CI/CD / build (push) Has been cancelled
Some checks failed
BotUI CI/CD / build (push) Has been cancelled
This commit is contained in:
parent
928e259745
commit
d813fc2a25
1 changed files with 4 additions and 2 deletions
|
|
@ -302,7 +302,8 @@ function addMessage(sender, content, msgId) {
|
|||
"</div>";
|
||||
} else {
|
||||
// Check if content has HTML (any tag, including comments)
|
||||
var hasHtmlTags = (content.indexOf("<") !== -1 && /<[a-zA-Z]/.test(content)) || content.indexOf("<!--") !== -1;
|
||||
var htmlRegex = new RegExp("<[a-zA-Z]");
|
||||
var hasHtmlTags = (content.indexOf("<") !== -1 && htmlRegex.test(content)) || content.indexOf("<!--") !== -1;
|
||||
console.log("Bot message - hasHtmlTags:", hasHtmlTags, "content length:", content.length, "msgId:", msgId);
|
||||
|
||||
var parsed;
|
||||
|
|
@ -760,7 +761,8 @@ function addMessage(sender, content, msgId) {
|
|||
lastRenderTime = now;
|
||||
|
||||
// Check if content has HTML
|
||||
var hasHtmlTags = (currentStreamingContent.indexOf("<") !== -1 && /<[a-zA-Z]/.test(currentStreamingContent)) || currentStreamingContent.indexOf("<!--") !== -1;
|
||||
var htmlRegex = new RegExp("<[a-zA-Z]");
|
||||
var hasHtmlTags = (currentStreamingContent.indexOf("<") !== -1 && htmlRegex.test(currentStreamingContent)) || currentStreamingContent.indexOf("<!--") !== -1;
|
||||
|
||||
if (hasHtmlTags) {
|
||||
// HTML Streaming: Add to temporary buffer and only render valid chunks
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue