diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 47a01da..9efcab0 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -1556,13 +1556,15 @@ function format_string($string, array $args = array()) { * The text to be checked or processed. * * @return - * An HTML safe version of $text, or an empty string if $text is not - * valid UTF-8. + * An HTML safe version of $text, or FALSE if $text is not valid UTF-8. * * @see drupal_validate_utf8() * @ingroup sanitization */ function check_plain($text) { + if (!drupal_validate_utf8($text)) { + return FALSE; + } return htmlspecialchars($text, ENT_QUOTES, 'UTF-8'); }