Skip to content

Commit cb977a7

Browse files
authored
fix: When voice playback is turned on, if the answer contains a link, there will be the following abnormal message (#4488)
1 parent 11a894f commit cb977a7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ function markdownToPlainText(md: string) {
178178
.replace(/`(.*?)`/g, '$1')
179179
// 移除代码块 ```code```
180180
.replace(/```[\s\S]*?```/g, '')
181+
// 移除html标签
182+
.replace(/<[^>]+>/g, '')
181183
// 移除多余的换行符
182184
.replace(/\n{2,}/g, '\n')
183185
.trim()

0 commit comments

Comments
 (0)