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(/<$/, '') .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) => {