Encodes special characters in a plain-text string for display as HTML.
\Drupal\Component\Utility\String::checkPlain()
drupal_validate_utf8()
... See full list
function check_plain($text) { return String::checkPlain($text); }