feat(task-comments): enhance comment processing with linkification and sanitization
- Added a utility to linkify URLs in comments, allowing users to click and open links. - Refactored comment content processing to handle both mentions and links, improving user interaction. - Updated the sanitizeHtml function to allow <span> tags for mentions, enhancing content display.
This commit is contained in:
@@ -29,7 +29,7 @@ export const sanitizeHtml = (input: string): string => {
|
||||
if (!input) return '';
|
||||
|
||||
return DOMPurify.sanitize(input, {
|
||||
ALLOWED_TAGS: ['b', 'i', 'em', 'strong', 'a', 'p', 'br'],
|
||||
ALLOWED_ATTR: ['href', 'target', 'rel'],
|
||||
ALLOWED_TAGS: ['b', 'i', 'em', 'strong', 'a', 'p', 'br', 'span'],
|
||||
ALLOWED_ATTR: ['href', 'target', 'rel', 'class'],
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user