浏览代码

Also replace > with >

Austen Adler 11 月之前
父节点
当前提交
c9799991f2
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/lib/utils/index.ts

+ 4 - 1
src/lib/utils/index.ts

@@ -36,11 +36,14 @@ export const sanitizeResponseContent = (content: string) => {
 		.replace(/<$/, '')
 		.replace(/<$/, '')
 		.replaceAll(/<\|[a-z]+\|>/g, ' ')
 		.replaceAll(/<\|[a-z]+\|>/g, ' ')
 		.replaceAll('<', '&lt;')
 		.replaceAll('<', '&lt;')
+		.replaceAll('>', '&gt;')
 		.trim();
 		.trim();
 };
 };
 
 
 export const revertSanitizedResponseContent = (content: string) => {
 export const revertSanitizedResponseContent = (content: string) => {
-	return content.replaceAll('&lt;', '<');
+	return content
+		.replaceAll('&lt;', '<')
+		.replaceAll('&gt;', '>');
 };
 };
 
 
 export const capitalizeFirstLetter = (string) => {
 export const capitalizeFirstLetter = (string) => {