Skip to content

Commit e4e2504

Browse files
committed
docs: update changeset with HTML sanitizer feature
1 parent bcec15d commit e4e2504

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.changeset/fix-banner-content-types.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@
33
'@prosdevlab/experience-sdk-plugins': patch
44
---
55

6-
Fix BannerContent type definition and add CSS customization support:
6+
Fix BannerContent type definition, add CSS customization support, and implement HTML sanitization:
77

88
- Add `buttons` array property with variant and metadata support
99
- Add `position` property (top/bottom)
1010
- Make `title` optional (message is the only required field)
1111
- Add `className` and `style` props for banner and buttons
1212
- Update banner plugin to use `.xp-*` CSS classes
1313
- Provide minimal, functional default styles
14+
- Add HTML sanitizer for XSS prevention in title and message fields
15+
- Support safe HTML tags (strong, em, a, br, span, b, i, p)
16+
- Block dangerous tags and event handlers
17+
- Sanitize URLs to prevent javascript: and data: attacks
1418
- Aligns core types with banner plugin implementation
1519

16-
This enables users to customize banners with Tailwind, design systems, or CSS frameworks while maintaining SDK's focus on targeting logic.
20+
This enables users to customize banners with Tailwind, design systems, or CSS frameworks while maintaining SDK's focus on targeting logic. HTML sanitization ensures safe rendering of user-provided content.
1721

0 commit comments

Comments
 (0)