{"profile":"basic","original_length":131,"clean_length":143,"removed_bytes":-12,"clean":"{\"html\": \"<p>Hello <b>world</b>, this is <i>rich</i> text with a <a href=\"\\"https://example.com\\"\">link</a></p>\", \"profile\": \"strip\"}"}
curl --location --request POST 'https://zylalabs.com/api/13167/web+content+sanitizer+api/26714/sanitize+web+content' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{"html": "Hello world, this is rich text with a link
", "profile": "strip"}'
साइन अप करने के बाद, प्रत्येक डेवलपर को एक पर्सनल API एक्सेस की असाइन की जाती है, जो अक्षरों और अंकों का एक यूनिक संयोजन होता है, जिसका उपयोग हमारे API एंडपॉइंट तक पहुंचने के लिए किया जाता है। प्रमाणीकरण के लिए Web Content Sanitizer API के साथ बस अपने बेयरर टोकन को Authorization हेडर में शामिल करें।
| हेडर | विवरण |
|---|---|
Authorization
|
आवश्यक
होना चाहिए Bearer access_key. जब आप सब्सक्राइब हों तो ऊपर "Your API Access Key" देखें।
|
कोई लंबी अवधि की प्रतिबद्धता नहीं। कभी भी अपग्रेड, डाउनग्रेड या कैंसल करें। फ्री ट्रायल में 50 रिक्वेस्ट तक शामिल हैं।
(वार्षिक बिलिंग के साथ 2 महीने बचाएँ 🎉)
अग्रणी कंपनियों का भरोसा
Make user submitted markup safe before it reaches your pages. One call strips scripts, inline event handlers and dangerous attributes while preserving harmless formatting.
Useful for user comments and reviews, rich text editor output before storage, markup arriving from messages or external hooks, and scraped content displayed inside your product.
The Sanitize Web Content endpoint returns a JSON object containing the cleaned HTML markup, the profile used for sanitization, the original length of the input, the cleaned length, and the number of bytes removed during the process.
The key fields in the response data include "profile" (the sanitization profile used), "original_length" (length of the input markup), "clean_length" (length of the sanitized markup), "removed_bytes" (number of bytes removed), and "clean" (the sanitized HTML content).
The endpoint accepts parameters such as "markup" (the HTML content to be sanitized) and "profile" (to specify the cleaning profile: plain text, safe formatting, or relaxed). Users can also provide a custom allowed tag list.
The response data is organized as a JSON object. It includes fields for the profile used, lengths of the original and cleaned markup, the number of bytes removed, and the cleaned HTML content itself, making it easy to parse and utilize.
Typical use cases include sanitizing user comments and reviews, cleaning rich text editor output before storage, processing markup from messages or external hooks, and ensuring scraped content is safe for display within applications.
Users can customize their requests by selecting different sanitization profiles (plain text, safe formatting, relaxed) and by providing a custom allowed tag list to control which HTML tags are preserved during the sanitization process.
प्रतिक्रिया में "प्रोफ़ाइल" उस स्वच्छता विधि को दर्शाती है जो उपयोग की गई है "मूल_लंबाई" इनपुट मार्कअप की लंबाई को दिखाती है "स्वच्छ_लंबाई" स्वच्छीकरण के साथ आउटपुट की लंबाई को दर्शाती है "हटाए गए_बाइट" उस डेटा की मात्रा को दर्शाता है जो हटाया गया है और "स्वच्छ" स्वच्छित एचटीएमएल को समाहित करता है
डेटा की सटीकता को पूर्वनिर्धारित सफाई प्रोफाइल का उपयोग करके बनाए रखा जाता है जो लगातार हानिकारक तत्वों को हटा देती है जबकि सुरक्षित स्वरूपण को बनाए रखती है एपीआई हटाए गए डेटा की मात्रा पर फीडबैक भी प्रदान करता है जिससे उपयोगकर्ता सैनीटाइजेशन की प्रभावशीलता का मूल्यांकन कर सकें