[drupal-devel] [task] drupal_specialchars() can now use UTF-8

Uwe Hermann drupal-devel at drupal.org
Mon Mar 28 13:39:50 UTC 2005

Issue status update for http://drupal.org/node/19591

 Project:      Drupal
 Version:      cvs
 Component:    base system
 Category:     tasks
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  Uwe Hermann
 Updated by:   Uwe Hermann
 Status:       active

>From includes/common.inc (Drupal 4.6/CVS):
 * Encode special characters in a string for display as HTML.
 * Note that we'd like to use htmlspecialchars($input, $quotes,
 * as outlined in the PHP manual, but we can't because there's a bug in
 * PHP < 4.3 that makes it mess up multibyte charsets if we specify the
 * charset. This will be changed later once we make PHP 4.3 a
function drupal_specialchars($input, $quotes = ENT_NOQUOTES) {
  return htmlspecialchars($input, $quotes);
As we now require at least PHP >= 4.3.3 (see INSTALL.txt) this can now
be tackled, I guess.

Uwe Hermann

More information about the drupal-devel mailing list