Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.289
diff -u -p -r1.289 bootstrap.inc
--- includes/bootstrap.inc	14 Jul 2009 10:22:15 -0000	1.289
+++ includes/bootstrap.inc	18 Jul 2009 15:59:12 -0000
@@ -1023,12 +1023,11 @@ function drupal_unpack($obj, $field = 'd
 
 /**
  * Encode special characters in a plain-text string for display as HTML.
- *
- * Uses drupal_validate_utf8 to prevent cross site scripting attacks on
- * Internet Explorer 6.
  */
 function check_plain($text) {
-  return drupal_validate_utf8($text) ? htmlspecialchars($text, ENT_QUOTES) : '';
+  // Validates strings as UTF-8 to prevent cross site scripting attacks on
+  // Internet Explorer 6.
+  return (preg_match('/^./us', $text) == 1) ? htmlspecialchars($text, ENT_QUOTES) : '';
 }
 
 /**
