Also replace > with >

This commit is contained in:
Austen Adler 2024-05-16 16:18:42 -04:00
parent 3a1fbb936b
commit c9799991f2

View File

@ -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) => {