Encode HTML special characters so they display as text instead of code, or decode entities back to characters. Use this to make user content safe and avoid XSS.
| Character | Entity | Number | Name |
|---|---|---|---|
| & | & | & | Ampersand |
| < | < | < | Less than |
| > | > | > | Greater than |
| " | " | " | Double quote |
| ' | ' | ' | Single quote |