Browse Source

Also replace > with >

Austen Adler 11 months ago
parent
commit
c9799991f2
1 changed files with 4 additions and 1 deletions
  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(/<$/, '')
 		.replaceAll(/<\|[a-z]+\|>/g, ' ')
 		.replaceAll('<', '&lt;')
+		.replaceAll('>', '&gt;')
 		.trim();
 };
 
 export const revertSanitizedResponseContent = (content: string) => {
-	return content.replaceAll('&lt;', '<');
+	return content
+		.replaceAll('&lt;', '<')
+		.replaceAll('&gt;', '>');
 };
 
 export const capitalizeFirstLetter = (string) => {