HTML to Entities
Description: This script converts special HTML characters to their entities version inside user entered data such as a TEXTAREA before the form is submitted. Specifically:
- '<' becomes '<'
- '>' becomes '>'
- '"' (double quote) becomes '"'
- ''' (single quote) becomes '''
- '&' becomes '&'
This helps prevent potentially harmful or disruptive HTML tags from being posted to your form.
See also: Strip HTML Tags (form) script
Example: