fix: post title sanitization in inbox (#561)

This commit is contained in:
sevonj authored and GitHub committed 2025-06-10 07:22:53 -07:00
1 parent a40142f9af
commit 84703b8aa2
2 files changed
+15 -2

No files matched your search

+9
View File
@@ -177,3 +177,12 @@ export function canParseUrl(url: string): boolean {
export function instanceId(actorId: string) {
return new URL(actorId).hostname
}
export function escapeHtml(input: string): string {
return input
.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;')
}