mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 03:47:49 +01:00
fix: <br> is not escaped in output text
This commit is contained in:
@@ -35,13 +35,12 @@ export const sanitizeResponseContent = (content: string) => {
|
||||
.replace(/<\|[a-z]+\|$/, '')
|
||||
.replace(/<$/, '')
|
||||
.replaceAll(/<\|[a-z]+\|>/g, ' ')
|
||||
.replaceAll(/<br\s?\/?>/gi, '\n')
|
||||
.replaceAll('<', '<')
|
||||
.trim();
|
||||
};
|
||||
|
||||
export const revertSanitizedResponseContent = (content: string) => {
|
||||
return content.replaceAll('<', '<');
|
||||
return content.replaceAll('<', '<');
|
||||
};
|
||||
|
||||
export const capitalizeFirstLetter = (string) => {
|
||||
|
||||
Reference in New Issue
Block a user