feat: sanitize input for checklists

This commit is contained in:
Henry
2026-03-16 13:35:03 +00:00
parent b8d1fe230d
commit 4088f9abd5
3 changed files with 30 additions and 24 deletions

View File

@@ -5,3 +5,4 @@ export * from "./email";
export * from "./dueDateFilters";
export * from "./s3";
export * from "./mentions";
export * from "./sanitize";

View File

@@ -0,0 +1,6 @@
/**
* 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();