From ac30220929b26b4b5c61fa8df5044829d12ac1b9 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Wed, 10 Dec 2025 16:53:27 +0800 Subject: [PATCH] fix: When voice playback is turned on, if the answer contains a link, there will be the following abnormal message --- .../ai-chat/component/operation-button/ChatOperationButton.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue index 209fdb6145b..c666cfdbd73 100644 --- a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue +++ b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue @@ -178,6 +178,8 @@ function markdownToPlainText(md: string) { .replace(/`(.*?)`/g, '$1') // 移除代码块 ```code``` .replace(/```[\s\S]*?```/g, '') + // 移除html标签 + .replace(/<[^>]+>/g, '') // 移除多余的换行符 .replace(/\n{2,}/g, '\n') .trim()