And if you wish to modify it to customize the allowed/disallowed tags for everything that uses this function, you can do so using the wp_kses_allowed_html filter and check that the second parameter is equal to 'data'.
You must log in before being able to contribute a note or feedback.
Example
Below example sanitizes input HTML string by removing non allowed tag <div> and <script>.
To find out what tags are allowed in this function, just access
global $allowedtags;. The code here……outputs the following:
And if you wish to modify it to customize the allowed/disallowed tags for everything that uses this function, you can do so using the
wp_kses_allowed_htmlfilter and check that the second parameter is equal to'data'.