Applies a very permissive XSS/HTML filter for admin-only use.
Use only for fields where it is impractical to use the whole filter system, but where some (mainly inline) mark-up is desired (so check_plain() is not acceptable).
Allows all tags that can be used inside an HTML body, save for scripts and styles.
string $string: The string to apply the filter to.
string The filtered string.
\Drupal\Component\Utility\Xss::filterAdmin()
function filter_xss_admin($string) {
return Xss::filterAdmin($string);
}