✅ Secure Component: Sanitized Marked Demo
This demo uses a secure rendering pipeline with sanitized markdown input to prevent XSS attacks.
🔬 How to Test This Secure Version
- Modify the Markdown in the textarea or keep the default.
- Click Render Markdown.
- The rendered HTML appears above.
- Clicking the button will not trigger an alert because dangerous attributes like
onclick
are sanitized. - This shows how sanitizing input prevents XSS attacks.
✅ Sanitization removes dangerous HTML and event handlers to secure markdown rendering.