Files
kan/packages/shared/src/utils/sanitize.ts
Henry 76b2c58461 fix: security improvements to checklist input (#444)
* feat: sanitize input for checklists

* feat: add basic editor

* feat: use plain text editor for checklist items

* feat: remove key from user response
2026-03-16 14:31:13 +00:00

7 lines
235 B
TypeScript

/**
* Strips all HTML tags from a string, returning plain text.
* Use this on any user-supplied text field before storing or displaying.
*/
export const stripHtml = (value: string): string =>
value.replace(/<[^>]*>/g, "").trim();