關於 HTML 實體
HTML 文本編碼與解碼
Encoding is useful when text must be displayed as text instead of interpreted as markup. It is context-dependent: HTML text, an HTML attribute, JavaScript, a URL, and a database query each have different escaping rules.
點樣用呢個開發者工具
- Choose encode or decode mode and paste the text you need to inspect.
- Run the conversion and compare characters such as ampersands, quotes, and angle brackets.
- Copy the result into the correct output context and apply that context's validation or sanitization rules.
私隱同資料處理
The conversion runs locally in your browser. The result is an encoded representation, not a security review; do not use it as a substitute for context-aware sanitization of untrusted input.
相關開發者工具
常見問題
Does HTML entity encoding sanitize a page?
No. It transforms characters for one HTML context. Safe rendering also requires correct context handling, sanitization, and a safe page architecture.
Why are some characters encoded as numbers?
Numeric entities can represent a character by code point and are useful when a named entity is unavailable or ambiguous.
Should I encode an entire URL with this tool?
No. URLs have their own percent-encoding rules. Use the URL encoder for URL components and complete URIs.