Explorar o código

Also replace > with >

Austen Adler hai 1 ano
pai
achega
c9799991f2
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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) => {