Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
8e94618c
Commit
8e94618c
authored
Apr 22, 2024
by
Danny Liu
Browse files
fix: <br> is not escaped in output text
parent
e6fad5cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
src/lib/utils/index.ts
src/lib/utils/index.ts
+1
-2
No files found.
src/lib/utils/index.ts
View file @
8e94618c
...
@@ -35,7 +35,6 @@ export const sanitizeResponseContent = (content: string) => {
...
@@ -35,7 +35,6 @@ export const sanitizeResponseContent = (content: string) => {
.
replace
(
/<
\|[
a-z
]
+
\|
$/
,
''
)
.
replace
(
/<
\|[
a-z
]
+
\|
$/
,
''
)
.
replace
(
/<$/
,
''
)
.
replace
(
/<$/
,
''
)
.
replaceAll
(
/<
\|[
a-z
]
+
\|
>/g
,
'
'
)
.
replaceAll
(
/<
\|[
a-z
]
+
\|
>/g
,
'
'
)
.
replaceAll
(
/<br
\s?\/?
>/gi
,
'
\n
'
)
.
replaceAll
(
'
<
'
,
'
<
'
)
.
replaceAll
(
'
<
'
,
'
<
'
)
.
trim
();
.
trim
();
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment