Commit 8e94618c authored by Danny Liu's avatar Danny Liu
Browse files

fix: <br> is not escaped in output text

parent e6fad5cc
...@@ -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('<', '&lt;') .replaceAll('<', '&lt;')
.trim(); .trim();
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment