Skip to content

Commit

Permalink
Refine sanitize config
Browse files Browse the repository at this point in the history
  • Loading branch information
mike182uk committed Jul 31, 2024
1 parent 854a0f8 commit 23b2929
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export async function inboxHandler(
thing.object = await db.get([thing.object]) ?? thing.object;
}

// Sanitize HTML content
if (thing?.object?.content) {
thing.object.content = sanitizeHtml(thing.object.content, {
allowedTags: ['a', 'p', 'img', 'br', 'strong', 'em', 'span'],
Expand Down

0 comments on commit 23b2929

Please sign in to comment.