security_html_sanitize
HTML sanitizer — Cleans untrusted HTML (user comments, LLM output, scraped pages, emails) so it is safe to render. Allowlist rebuild, not regex stripping: only allowed tags/attributes are re-emitted with re-escaped values; script/style/iframe/object/svg/form contents are dropped; on* event handlers, style, javascript:/vbscript:/data: URLs (entity- and whitespace-obfuscated too) are removed; comments stripped; unclosed tags closed. html= the markup (or url= to fetch a page), profile=strict|basic|rich (rich adds images, tables, sections), relative=0 blocks relative URLs, no_images=1, target_blank=1, link_rel=0 skips rel=noopener noreferrer nofollow. Returns the safe html, verdict CLEAN / CLEANED / DANGEROUS CONTENT REMOVED, and a report of what was removed. Price: $0.003 USDC (Base, via x402).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"html": "<html>"
},
"name": "security_html_sanitize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | <p onclick="steal()">Hi <b>there</b> <a href="javascript:alert(1)">x</a></p><script>alert(1)</script><img src=x onerror=alert(1)> |