Merge pull request #2180 from austenadler/dev

Always open links in chat in a new tab
This commit is contained in:
Timothy Jaeryang Baek
2024-05-25 21:32:39 -10:00
committed by GitHub
2 changed files with 11 additions and 1 deletions

View File

@@ -12,11 +12,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) => {