Sanitizes an html string by stripping all potentially dangerous tokens.
The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are then serialized back to properly escaped html string. This means that no unsafe input can make it into the returned string.
The whitelist for URL sanitization of attribute values is configured using the functions
The input may also contain SVG markup if this is enabled via
|html|| || |
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.