* refactor: move web utils to packages * fix: build and lint errors * chore: update drag handle plugin * chore: update table cell type to fix build errors * fix: build errors * chore: sync few changes * fix: build errors * chore: minor fixes related to duplicate assets imports * fix: build errors * chore: minor changes
8 lines
322 B
TypeScript
8 lines
322 B
TypeScript
import { stripAndTruncateHTML } from "./string";
|
|
|
|
export const sanitizeCommentForNotification = (mentionContent: string | undefined) =>
|
|
mentionContent
|
|
? stripAndTruncateHTML(
|
|
mentionContent.replace(/<mention-component\b[^>]*\blabel="([^"]*)"[^>]*><\/mention-component>/g, "$1")
|
|
)
|
|
: mentionContent;
|