slideshare/src
Michael Mainguy d0e70f81e7 Major code quality improvements: Fix XSS vulnerabilities and replace browser dialogs
Security Fixes:
- Add DOMPurify HTML sanitization for all dangerouslySetInnerHTML usage
- Create comprehensive HTML sanitization utility with configurable security levels
- Implement safe template rendering for slide content and layouts
- Add input validation for image sources and dangerous attributes

UI/UX Improvements:
- Replace browser alert() and confirm() with proper React modal components
- Create reusable Modal, AlertDialog, and ConfirmDialog components
- Add useDialog hook for easy dialog state management
- Implement proper accessibility with keyboard navigation and focus management
- Add smooth animations and responsive design for dialogs

Components Added:
- src/utils/htmlSanitizer.ts - Comprehensive HTML sanitization
- src/components/ui/Modal.tsx - Base modal component
- src/components/ui/AlertDialog.tsx - Alert dialog component
- src/components/ui/ConfirmDialog.tsx - Confirmation dialog component
- src/hooks/useDialog.ts - Dialog state management hook

Updated Components:
- SlideEditor.tsx - Now uses sanitized HTML rendering
- LayoutPreviewPage.tsx - Now uses sanitized HTML rendering
- PresentationEditor.tsx - Now uses React dialogs instead of browser dialogs

Benefits:
✅ Eliminates XSS vulnerabilities from unsafe HTML rendering
✅ Provides consistent, accessible user interface
✅ Improves user experience with proper modal dialogs
✅ Maintains security while preserving slide formatting capabilities
✅ Follows React best practices for component composition

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-20 17:41:15 -05:00
..
assets Add comprehensive theme routing and browsing system 2025-08-20 10:17:55 -05:00
components Major code quality improvements: Fix XSS vulnerabilities and replace browser dialogs 2025-08-20 17:41:15 -05:00
hooks Major code quality improvements: Fix XSS vulnerabilities and replace browser dialogs 2025-08-20 17:41:15 -05:00
plugins Remove iframe previews and improve theme hot reload with SVG demo content 2025-08-20 14:11:51 -05:00
styles feat: implement complete presentation management system with aspect ratio support 2025-08-20 16:34:00 -05:00
themes Add comprehensive theme routing and browsing system 2025-08-20 10:17:55 -05:00
types feat: implement complete presentation management system with aspect ratio support 2025-08-20 16:34:00 -05:00
utils Major code quality improvements: Fix XSS vulnerabilities and replace browser dialogs 2025-08-20 17:41:15 -05:00
App.css feat: implement complete presentation management system with aspect ratio support 2025-08-20 16:34:00 -05:00
App.tsx feat: implement complete presentation management system with aspect ratio support 2025-08-20 16:34:00 -05:00
index.css Add comprehensive theme routing and browsing system 2025-08-20 10:17:55 -05:00
main.tsx Add comprehensive theme routing and browsing system 2025-08-20 10:17:55 -05:00
vite-env.d.ts Add comprehensive theme routing and browsing system 2025-08-20 10:17:55 -05:00