{"uid":"cap_dLxbV_tcq7QIhIsSOrjYD","slug":"delx-html-escape-012f6517","name":"Delx HTML Escape","description":"HTML-escape text for safe embedding. Call when you inject agent text into HTML without XSS. Returns escaped text for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.","url":"https://api.delx.ai/api/v1/x402/html-escape","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Input field: text."}}},"responseSchema":{"type":"json","example":{"text":"a &lt;b&gt; &amp; &#x27;c&#x27; &gt; d","schema":"delx/util-html-escape/v1"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rpsPQHWMs3g_txAP7D9eI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"HTML-escapes a text string so it can be safely embedded in HTML without XSS risk","exampleAgentPrompt":"HTML-escape this string for me so I can safely drop it into an HTML page without XSS risk: '<script>alert(\"hello\")</script> — thanks, Johnson & Associates'","exampleUseCases":[{"title":"Sanitizing user comments for web display","prompt":"I'm about to inject a user's comment into my HTML template and it contains angle brackets and ampersands — can you HTML-escape it for me? The text is: '<b>Great product</b> & very fast shipping!'"},{"title":"Protecting dynamic agent output in HTML emails","prompt":"Before I insert this agent-generated summary into an HTML email body, please HTML-escape it so nothing breaks or runs as code: 'Price dropped to <$50 for \"Premium\" plan — 10% off & free trial.'"},{"title":"Encoding attribute values in dynamic HTML generation","prompt":"I need to put this description into an HTML title attribute and it has quotes and special chars — please HTML-escape it: 'Smith & Co. said: \"We're #1 in the <industry>\"'"}],"resultDescription":"Returns the input text with all HTML special characters converted to their safe entity equivalents (e.g. < becomes &lt;, > becomes &gt;, & becomes &amp;, \" becomes &quot;), ready for direct embedding in HTML without XSS risk.","failureModes":["Empty or missing 'text' field returns an error or empty result","Extremely large payloads may be rejected or time out","Payment failure via x402 will block the call from completing","Non-string input types may cause a validation error"],"whenToPreferThis":"Choose this endpoint when your agent pipeline dynamically injects text into HTML and you need a lightweight, stateless, pay-per-call HTML-escaping step without managing a library or server-side dependency. It is ideal for agents that produce HTML emails, web snippets, or templated pages where user-generated or LLM-generated text must be sanitized on the fly. Prefer it over a full sanitization library when you only need character-level HTML entity encoding and not full HTML parsing or stripping.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:40.536Z","isFirstParty":false}