71trust / 100
Html Sanitize Execute
by tradepilotusa.com in Search & web
x402 APIPassing, checked 8 min ago
Strip an HTML fragment down to a vetted allowlist of semantic/structural tags and safe attributes, removing script tags, inline event handlers and unsafe link/media schemes (only http, https, mailto, tel survive). Forces rel=noopener noreferrer on every anchor. Does not render, fetch, or validate the HTML.
POST https://www.tradepilotusa.com/api/agent-commerce/v1/services/html_sanitize/execute
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 1.1 s typical, 1.2 s slowest 5%
- Last check
- 8 min ago
- Next check
- in 24 min
How to call it
# bash or zsh: see the payment challenge (nothing is charged)
curl -g -i -X POST 'https://www.tradepilotusa.com/api/agent-commerce/v1/services/html_sanitize/execute' \
-H 'content-type: application/json' \
--data-raw '{"html":"<p class=\"intro\" style=\"color:red\" data-track=\"hero\">Hello <b>world<\/b><\/p><a href=\"https://example.com/docs\" target=\"_blank\">Read the docs<\/a>"}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fwww.tradepilotusa.com%2Fapi%2Fagent-commerce%2Fv1%2Fservices%2Fhtml_sanitize%2Fexecute
const res = await pay("https://www.tradepilotusa.com/api/agent-commerce/v1/services/html_sanitize/execute", {
method: "POST",
headers: { "content-type": "application/json" },
body: "{\"html\":\"<p class=\\\"intro\\\" style=\\\"color:red\\\" data-track=\\\"hero\\\">Hello <b>world<\/b><\/p><a href=\\\"https://example.com/docs\\\" target=\\\"_blank\\\">Read the docs<\/a>\"}",
});
console.log(await res.json());Example input
{
"html": "<p class=\"intro\" style=\"color:red\" data-track=\"hero\">Hello <b>world</b></p><a href=\"https://example.com/docs\" target=\"_blank\">Read the docs</a>"
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 8 min ago | Passed | 402 | 966 ms | $0.01 |
| 4 h ago | Passed | 402 | 942 ms | $0.01 |
| 8 h ago | Passed | 402 | 1.1 s | $0.01 |
| 12 h ago | Passed | 402 | 1.2 s | $0.01 |
| 16 h ago | Passed | 402 | 1.1 s | $0.01 |
| 20 h ago | Passed | 402 | 979 ms | $0.01 |
| 23 h ago | Passed | 402 | 1.1 s | $0.01 |
| 27 h ago | Passed | 402 | 1.1 s | $0.01 |
| 30 h ago | Passed | 402 | 703 ms | $0.01 |
| 34 h ago | Passed | 402 | 1.0 s | $0.01 |
| 37 h ago | Passed | 402 | 1.1 s | $0.01 |
| 40 h ago | Passed | 402 | 1.6 s | $0.01 |
| 44 h ago | Passed | 402 | 1.0 s | $0.01 |
| 2 days ago | Passed | 402 | 1.0 s | $0.01 |
| 2 days ago | Passed | 402 | 1.2 s | $0.01 |