* feat: sanitize input for checklists * feat: add basic editor * feat: use plain text editor for checklist items * feat: remove key from user response
7 lines
235 B
TypeScript
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();
|