diff --git includes/unicode.entities.inc includes/unicode.entities.inc
deleted file mode 100644
index 7b0a490..0000000
--- includes/unicode.entities.inc
+++ /dev/null
@@ -1,266 +0,0 @@
-<?php
-// $Id: unicode.entities.inc,v 1.2 2009/04/26 15:14:55 dries Exp $
-
-/**
- * @file
- * (X)HTML entities, as defined in HTML 4.01.
- *
- * @see http://www.w3.org/TR/html401/sgml/entities.html
- */
-
-$html_entities = array(
-  '&Aacute;' => 'Á',
-  '&aacute;' => 'á',
-  '&Acirc;' => 'Â',
-  '&acirc;' => 'â',
-  '&acute;' => '´',
-  '&AElig;' => 'Æ',
-  '&aelig;' => 'æ',
-  '&Agrave;' => 'À',
-  '&agrave;' => 'à',
-  '&alefsym;' => 'ℵ',
-  '&Alpha;' => 'Α',
-  '&alpha;' => 'α',
-  '&amp;' => '&',
-  '&and;' => '∧',
-  '&ang;' => '∠',
-  '&Aring;' => 'Å',
-  '&aring;' => 'å',
-  '&asymp;' => '≈',
-  '&Atilde;' => 'Ã',
-  '&atilde;' => 'ã',
-  '&Auml;' => 'Ä',
-  '&auml;' => 'ä',
-  '&bdquo;' => '„',
-  '&Beta;' => 'Β',
-  '&beta;' => 'β',
-  '&brvbar;' => '¦',
-  '&bull;' => '•',
-  '&cap;' => '∩',
-  '&Ccedil;' => 'Ç',
-  '&ccedil;' => 'ç',
-  '&cedil;' => '¸',
-  '&cent;' => '¢',
-  '&Chi;' => 'Χ',
-  '&chi;' => 'χ',
-  '&circ;' => 'ˆ',
-  '&clubs;' => '♣',
-  '&cong;' => '≅',
-  '&copy;' => '©',
-  '&crarr;' => '↵',
-  '&cup;' => '∪',
-  '&curren;' => '¤',
-  '&dagger;' => '†',
-  '&Dagger;' => '‡',
-  '&darr;' => '↓',
-  '&dArr;' => '⇓',
-  '&deg;' => '°',
-  '&Delta;' => 'Δ',
-  '&delta;' => 'δ',
-  '&diams;' => '♦',
-  '&divide;' => '÷',
-  '&Eacute;' => 'É',
-  '&eacute;' => 'é',
-  '&Ecirc;' => 'Ê',
-  '&ecirc;' => 'ê',
-  '&Egrave;' => 'È',
-  '&egrave;' => 'è',
-  '&empty;' => '∅',
-  '&emsp;' => ' ',
-  '&ensp;' => ' ',
-  '&Epsilon;' => 'Ε',
-  '&epsilon;' => 'ε',
-  '&equiv;' => '≡',
-  '&Eta;' => 'Η',
-  '&eta;' => 'η',
-  '&ETH;' => 'Ð',
-  '&eth;' => 'ð',
-  '&Euml;' => 'Ë',
-  '&euml;' => 'ë',
-  '&euro;' => '€',
-  '&exist;' => '∃',
-  '&fnof;' => 'ƒ',
-  '&forall;' => '∀',
-  '&frac12;' => '½',
-  '&frac14;' => '¼',
-  '&frac34;' => '¾',
-  '&frasl;' => '⁄',
-  '&Gamma;' => 'Γ',
-  '&gamma;' => 'γ',
-  '&ge;' => '≥',
-  '&harr;' => '↔',
-  '&hArr;' => '⇔',
-  '&hearts;' => '♥',
-  '&hellip;' => '…',
-  '&Iacute;' => 'Í',
-  '&iacute;' => 'í',
-  '&Icirc;' => 'Î',
-  '&icirc;' => 'î',
-  '&iexcl;' => '¡',
-  '&Igrave;' => 'Ì',
-  '&igrave;' => 'ì',
-  '&image;' => 'ℑ',
-  '&infin;' => '∞',
-  '&int;' => '∫',
-  '&Iota;' => 'Ι',
-  '&iota;' => 'ι',
-  '&iquest;' => '¿',
-  '&isin;' => '∈',
-  '&Iuml;' => 'Ï',
-  '&iuml;' => 'ï',
-  '&Kappa;' => 'Κ',
-  '&kappa;' => 'κ',
-  '&Lambda;' => 'Λ',
-  '&lambda;' => 'λ',
-  '&lang;' => '〈',
-  '&laquo;' => '«',
-  '&larr;' => '←',
-  '&lArr;' => '⇐',
-  '&lceil;' => '⌈',
-  '&ldquo;' => '“',
-  '&le;' => '≤',
-  '&lfloor;' => '⌊',
-  '&lowast;' => '∗',
-  '&loz;' => '◊',
-  '&lrm;' => '‎',
-  '&lsaquo;' => '‹',
-  '&lsquo;' => '‘',
-  '&macr;' => '¯',
-  '&mdash;' => '—',
-  '&micro;' => 'µ',
-  '&middot;' => '·',
-  '&minus;' => '−',
-  '&Mu;' => 'Μ',
-  '&mu;' => 'μ',
-  '&nabla;' => '∇',
-  '&nbsp;' => ' ',
-  '&ndash;' => '–',
-  '&ne;' => '≠',
-  '&ni;' => '∋',
-  '&not;' => '¬',
-  '&notin;' => '∉',
-  '&nsub;' => '⊄',
-  '&Ntilde;' => 'Ñ',
-  '&ntilde;' => 'ñ',
-  '&Nu;' => 'Ν',
-  '&nu;' => 'ν',
-  '&Oacute;' => 'Ó',
-  '&oacute;' => 'ó',
-  '&Ocirc;' => 'Ô',
-  '&ocirc;' => 'ô',
-  '&OElig;' => 'Œ',
-  '&oelig;' => 'œ',
-  '&Ograve;' => 'Ò',
-  '&ograve;' => 'ò',
-  '&oline;' => '‾',
-  '&Omega;' => 'Ω',
-  '&omega;' => 'ω',
-  '&Omicron;' => 'Ο',
-  '&omicron;' => 'ο',
-  '&oplus;' => '⊕',
-  '&or;' => '∨',
-  '&ordf;' => 'ª',
-  '&ordm;' => 'º',
-  '&Oslash;' => 'Ø',
-  '&oslash;' => 'ø',
-  '&Otilde;' => 'Õ',
-  '&otilde;' => 'õ',
-  '&otimes;' => '⊗',
-  '&Ouml;' => 'Ö',
-  '&ouml;' => 'ö',
-  '&para;' => '¶',
-  '&part;' => '∂',
-  '&permil;' => '‰',
-  '&perp;' => '⊥',
-  '&Phi;' => 'Φ',
-  '&phi;' => 'φ',
-  '&Pi;' => 'Π',
-  '&pi;' => 'π',
-  '&piv;' => 'ϖ',
-  '&plusmn;' => '±',
-  '&pound;' => '£',
-  '&prime;' => '′',
-  '&Prime;' => '″',
-  '&prod;' => '∏',
-  '&prop;' => '∝',
-  '&Psi;' => 'Ψ',
-  '&psi;' => 'ψ',
-  '&radic;' => '√',
-  '&rang;' => '〉',
-  '&raquo;' => '»',
-  '&rarr;' => '→',
-  '&rArr;' => '⇒',
-  '&rceil;' => '⌉',
-  '&rdquo;' => '”',
-  '&real;' => 'ℜ',
-  '&reg;' => '®',
-  '&rfloor;' => '⌋',
-  '&Rho;' => 'Ρ',
-  '&rho;' => 'ρ',
-  '&rlm;' => '‏',
-  '&rsaquo;' => '›',
-  '&rsquo;' => '’',
-  '&sbquo;' => '‚',
-  '&Scaron;' => 'Š',
-  '&scaron;' => 'š',
-  '&sdot;' => '⋅',
-  '&sect;' => '§',
-  '&shy;' => '­',
-  '&Sigma;' => 'Σ',
-  '&sigma;' => 'σ',
-  '&sigmaf;' => 'ς',
-  '&sim;' => '∼',
-  '&spades;' => '♠',
-  '&sub;' => '⊂',
-  '&sube;' => '⊆',
-  '&sum;' => '∑',
-  '&sup1;' => '¹',
-  '&sup2;' => '²',
-  '&sup3;' => '³',
-  '&sup;' => '⊃',
-  '&supe;' => '⊇',
-  '&szlig;' => 'ß',
-  '&Tau;' => 'Τ',
-  '&tau;' => 'τ',
-  '&there4;' => '∴',
-  '&Theta;' => 'Θ',
-  '&theta;' => 'θ',
-  '&thetasym;' => 'ϑ',
-  '&thinsp;' => ' ',
-  '&THORN;' => 'Þ',
-  '&thorn;' => 'þ',
-  '&tilde;' => '˜',
-  '&times;' => '×',
-  '&trade;' => '™',
-  '&Uacute;' => 'Ú',
-  '&uacute;' => 'ú',
-  '&uarr;' => '↑',
-  '&uArr;' => '⇑',
-  '&Ucirc;' => 'Û',
-  '&ucirc;' => 'û',
-  '&Ugrave;' => 'Ù',
-  '&ugrave;' => 'ù',
-  '&uml;' => '¨',
-  '&upsih;' => 'ϒ',
-  '&Upsilon;' => 'Υ',
-  '&upsilon;' => 'υ',
-  '&Uuml;' => 'Ü',
-  '&uuml;' => 'ü',
-  '&weierp;' => '℘',
-  '&Xi;' => 'Ξ',
-  '&xi;' => 'ξ',
-  '&Yacute;' => 'Ý',
-  '&yacute;' => 'ý',
-  '&yen;' => '¥',
-  '&yuml;' => 'ÿ',
-  '&Yuml;' => 'Ÿ',
-  '&Zeta;' => 'Ζ',
-  '&zeta;' => 'ζ',
-  '&zwj;' => '‍',
-  '&zwnj;' => '‌',
-  '&gt;' => '>',
-  '&lt;' => '<',
-  '&quot;' => '"',
-  // Add apostrophe (XML).
-  '&apos;' => "'",
-);
diff --git includes/unicode.inc includes/unicode.inc
index 24cc6bb..544b164 100644
--- includes/unicode.inc
+++ includes/unicode.inc
@@ -422,94 +422,12 @@ function _mime_header_decode($matches) {
  *
  * @param $text
  *   The text to decode entities in.
- * @param $exclude
- *   An array of characters which should not be decoded. For example,
- *   array('<', '&', '"'). This affects both named and numerical entities.
  *
  * @return
  *   The input $text, with all HTML entities decoded once.
  */
-function decode_entities($text, $exclude = array()) {
-  // Flip the exclude list so that we can do quick lookups later.
-  $exclude = array_flip($exclude);
-
-  // Prepare the callback function.
-  _decode_entities(NULL, $exclude);
-
-  // Use a regexp to select all entities in one pass, to avoid decoding
-  // double-escaped entities twice.
-  return preg_replace_callback('/&(#x?)?([A-Za-z0-9]+);/', '_decode_entities', $text);
-}
-
-/**
- * Helper function for decode_entities
- *
- * @param $matches
- *   An array of matches found by preg_replace_callback(). Elements 0, 1, and 2
- *   of $matches must be the original entity, its prefix, and its codepoint.
- * @param $set_exclude
- *   An array of entities that should be excluded from decoding. This should
- *   only be set during a preparatory call before preg_replace_callback().
- *
- * @return
- *   The decoded entity for a given match, or the original encoded entity if
- *   the entity is in the list of excluded entities.
- */
-function _decode_entities($matches = NULL, $set_exclude = NULL) {
-  static $html_entities, $exclude;
-  if (!isset($html_entities)) {
-    include DRUPAL_ROOT . '/includes/unicode.entities.inc';
-  }
-  if (isset($set_exclude)) {
-    // This is a preparatory call.
-    $exclude = $set_exclude;
-    return;
-  }
-  list($original, $prefix, $codepoint) = $matches;
-  // Named entity
-  if (!$prefix) {
-    // A named entity not in the exclude list.
-    if (isset($html_entities[$original]) && !isset($exclude[$html_entities[$original]])) {
-      return $html_entities[$original];
-    }
-    else {
-      return $original;
-    }
-  }
-  // Hexadecimal numerical entity
-  if ($prefix == '#x') {
-    $codepoint = base_convert($codepoint, 16, 10);
-  }
-  // Decimal numerical entity (strip leading zeros to avoid PHP octal notation)
-  else {
-    $codepoint = preg_replace('/^0+/', '', $codepoint);
-  }
-  // Encode codepoint as UTF-8 bytes
-  if ($codepoint < 0x80) {
-    $str = chr($codepoint);
-  }
-  elseif ($codepoint < 0x800) {
-    $str = chr(0xC0 | ($codepoint >> 6))
-         . chr(0x80 | ($codepoint & 0x3F));
-  }
-  elseif ($codepoint < 0x10000) {
-    $str = chr(0xE0 | ( $codepoint >> 12))
-         . chr(0x80 | (($codepoint >> 6) & 0x3F))
-         . chr(0x80 | ( $codepoint       & 0x3F));
-  }
-  elseif ($codepoint < 0x200000) {
-    $str = chr(0xF0 | ( $codepoint >> 18))
-         . chr(0x80 | (($codepoint >> 12) & 0x3F))
-         . chr(0x80 | (($codepoint >> 6)  & 0x3F))
-         . chr(0x80 | ( $codepoint        & 0x3F));
-  }
-  // Check for excluded characters
-  if (isset($exclude[$str])) {
-    return $original;
-  }
-  else {
-    return $str;
-  }
+function decode_entities($text) {
+  return html_entity_decode($text, ENT_QUOTES, 'UTF-8');
 }
 
 /**
diff --git modules/simpletest/tests/unicode.test modules/simpletest/tests/unicode.test
index a449d5a..af48ba9 100644
--- modules/simpletest/tests/unicode.test
+++ modules/simpletest/tests/unicode.test
@@ -218,36 +218,6 @@ class UnicodeUnitTest extends DrupalWebTestCase {
     }
   }
 
-  function testDecodeEntitiesExclusion() {
-    $testcase = array(
-      'Drupal' => 'Drupal',
-      '<script>' => '<script>',
-      '&lt;script&gt;' => '&lt;script>',
-      '&#60;script&#62;' => '&#60;script>',
-      '&amp;lt;script&amp;gt;' => '&amp;lt;script&amp;gt;',
-      '"' => '"',
-      '&#34;' => '&#34;',
-      '&amp;#34;' => '&amp;#34;',
-      '&quot;' => '&quot;',
-      '&amp;quot;' => '&amp;quot;',
-      "'" => "'",
-      '&#39;' => "'",
-      '&amp;#39;' => '&amp;#39;',
-      '©' => '©',
-      '&copy;' => '©',
-      '&#169;' => '©',
-      '→' => '→',
-      '&#8594;' => '→',
-      '➼' => '➼',
-      '&#10172;' => '➼',
-      '&euro;' => '€',
-    );
-    $exclude = array('<', '&', '"');
-    foreach ($testcase as $input => $output) {
-      $this->assertIdentical(decode_entities($input, $exclude), $output, t('Make sure the decoded entity of %input, excluding %excludes, is %output', array('%input' => $input, '%excludes' => implode(',', $exclude), '%output' => $output)));
-    }
-  }
-
   /**
    * Tests truncate_utf8().
    */
