Edge HTML Sanitizer, Script Stripper & XSS Neutralizer
sanitize_html_contentSanitizes raw HTML or live URLs by removing malicious script tags, iframes, inline event handlers, and data URIs into safe markup. Accepts either 'url' to fetch directly or raw 'html_content' from upstream scrape_readable_article; for converting clean HTML into markdown, use extract_clean_markdown instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'url' or 'html_content' ('sanitization_strictness' defaults to 'strip_scripts_and_iframes'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "sanitize_html_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Optional web page URL to fetch and sanitize directly, bypassing an out-of-band fetch step. | |
| html_content | No | Untrusted or potentially hazardous HTML string requiring sanitization. | |
| preserve_images | No | Whether to retain safe img elements with http/https sources. | |
| sanitization_strictness | No | Sanitizer filter policy: strip scripts and iframes, allowlist safe formatting, or plaintext strip all. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sanitized_html | Yes | Safe, purified HTML output free of active scripting threats. | |
| elements_removed | Yes | List of dangerous tags and attributes removed during processing. | |
| xss_vectors_neutralized | Yes | Count of potential script execution vectors disarmed. |