✅ 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

  1. Modify the Markdown in the textarea or keep the default.
  2. Click Render Markdown.
  3. The rendered HTML appears above.
  4. Clicking the button will not trigger an alert because dangerous attributes like onclick are sanitized.
  5. This shows how sanitizing input prevents XSS attacks.

✅ Sanitization removes dangerous HTML and event handlers to secure markdown rendering.