Skip to content

Commit

Permalink
docs: document HTML sanitization
Browse files Browse the repository at this point in the history
  • Loading branch information
lucgagan committed Nov 12, 2023
1 parent 868534e commit 53f71a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sanitizeHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export const sanitizeHtml = (subject: string) => {
return sanitize(subject, {
// The default allowedTags list already includes _a lot_ of commonly used tags.
// https://www.npmjs.com/package/sanitize-html#default-options
//
// I don't see a need for this to be configurable at the moment,
// as it already covers all the layout tags, but we can revisit this if necessary.
allowedTags: sanitize.defaults.allowedTags.concat([
"button",
"form",
Expand Down

0 comments on commit 53f71a2

Please sign in to comment.