sanitize_html_class

Sanitizes a html classname to ensure it only contains valid characters.

Strips the string down to A-Z,a-z,0-9,_,-. If this results in an empty string, then the function will return the alternative value supplied. After sanitize_html_class() has done its work, it passes the sanitized class name through the sanitize_html_class filter.

Input:
[?]

Have Feedback?

Let us know how we can improve this tool.
Share Feedback