Html Sanitize
html_sanitizeSanitize untrusted HTML (LLM output, user comments, scraped pages, email bodies) with a strict allowlist before rendering it: three profiles (strict inline formatting, basic with links and lists, rich with images and tables) or a custom tag list; drops scripts, styles, iframes, forms, SVG/MathML, event handlers, javascript:/vbscript:/data: URLs and comments; adds rel="noopener noreferrer nofollow" (+ optional target=_blank) to links; returns clean HTML, a plain-text version and a report of everything removed. Price: $0.002 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/html-sanitize
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": "html_sanitize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | ||
| profile | No | basic | |
| schemes | No | Allowed URL schemes for href/src/cite | |
| nofollow | No | ||
| allowTags | No | Custom allowlist (replaces the profile; dangerous tags are always removed) | |
| linkTarget | No | none | |
| allowDataImages | No | Permit data:image/(png|gif|jpeg|webp) in img src |