Commit Graph

7 Commits

Author SHA1 Message Date
Stefan Hardegger
379c8c170f Various improvements & Epub support 2025-08-08 14:09:14 +02:00
Stefan Hardegger
57859d7a84 Reading Progress 2025-07-29 14:53:44 +02:00
Stefan Hardegger
f95d7aa8bb Various Fixes and QoL enhancements. 2025-07-26 12:05:54 +02:00
Stefan Hardegger
312093ae2e Story Collections Feature 2025-07-25 14:15:23 +02:00
Stefan Hardegger
5a48ebcfeb Implement shared HTML sanitization configuration
**Backend Changes:**
- Add html-sanitization-config.json with allowedTags, allowedAttributes, and allowedCssProperties
- Create HtmlSanitizationConfigDto for configuration data transfer
- Update HtmlSanitizationService to load configuration from JSON file with fallback
- Add HtmlSanitizationController with public API endpoint at /api/config/html-sanitization
- Update SecurityConfig to allow public access to /api/config/** endpoints

**Frontend Changes:**
- Add configApi.getHtmlSanitizationConfig() to fetch backend configuration
- Create sanitization.ts utility with sanitizeHtml() and sanitizeHtmlSync() functions
- Update story reading page to use shared sanitization configuration
- Add preloadSanitizationConfig() for early configuration loading
- Handle TrustedHTML type conversion and DOMPurify config compatibility

**Benefits:**
- Consistent HTML sanitization rules between frontend and backend
- Centralized configuration in JSON file for easy maintenance
- Automatic fallback to safe defaults if configuration loading fails
- API-driven approach allows runtime configuration updates
- Maintains security while providing flexibility for content formatting

Resolves HTML sanitization inconsistencies and provides foundation for configurable content safety rules.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 16:18:03 +02:00
Stefan Hardegger
d69bed00a2 MVP Version 2025-07-23 12:28:48 +02:00
Stefan Hardegger
59d29dceaf inital working version 2025-07-22 21:49:40 +02:00