# HTML



# Functions

- **function-decodeforhtml** - Decodes the given encoded string.
- **function-encodeforhtml** - Encodes the given string for safe output in HTML to reduce the risk of Cross Site Scripting attacks.
- **function-encodeforhtmlattribute** - Encodes the given string for safe output in HTML to reduce the risk of Cross Site Scripting attacks.
- **function-esapiencode** - Encodes the given string for safe output to reduce the risk of Cross Site Scripting attacks.
- **function-htmlcodeformat** - Replaces special characters in a string with their HTML-escaped equivalents and inserts and tags at the beginning and end of the string. [version] HTML version to use. currently ignored. -1: The latest implementation of HTML 2.0: HTML 2.0 (Default) 3.2: HTML 3.2
- **function-htmleditformat** - Replaces special characters in a string with their HTML-escaped equivalents. [version] HTML version to use. currently ignored. -1: The latest implementation of HTML 2.0: HTML 2.0 (Default) 3.2: HTML 3.2 4.0: HTML 4.0
- **function-htmlparse** - parse the given html (not only xhtml) as xml Object, work similar to xmlParse, but this function is very forgiving with the syntax..
- **function-paragraphformat** - Formats the carriage returns in a string to a HTML alternatives
- **function-sanitizehtml** - Sanitizes unsafe HTML input and removes elements and attributes like JavaScript, onclick, etc. See also https://github.com/OWASP/java-html-sanitizer

# Methods

- **method-string-decodeforhtml** - Decodes the given encoded string.
- **method-string-encodeforhtml** - Encodes the given string for safe output in HTML to reduce the risk of Cross Site Scripting attacks.
- **method-string-encodeforhtmlattribute** - Encodes the given string for safe output in HTML to reduce the risk of Cross Site Scripting attacks.
- **method-string-paragraphformat** - Formats the carriage returns in a string to a HTML alternatives
- **method-string-sanitizehtml** - Sanitizes unsafe HTML input and removes elements and attributes like JavaScript, onclick, etc. See also https://github.com/OWASP/java-html-sanitizer