fix: post title sanitization in inbox (#561)
This commit is contained in:
1 parent
a40142f9af
commit
84703b8aa2
2 files changed
+15
-2
No files matched your search
@@ -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, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
}
|
||||
Reference in new issue
Block a user