public function XmlUtility::decodeNamedHtmlEntities in Feeds extensible parsers 8
Converts named HTML entities to their UTF-8 equivalent.
Parameters
string $markup: The string.
Return value
string The converted string.
File
- src/
Utility/ XmlUtility.php, line 56
Class
- XmlUtility
- Simple XML helpers.
Namespace
Drupal\feeds_ex\UtilityCode
public function decodeNamedHtmlEntities($markup) {
$map = array_flip(get_html_translation_table(HTML_ENTITIES, ENT_NOQUOTES | ENT_HTML5, 'UTF-8'));
unset($map['&'], $map['<'], $map['>']);
return strtr($markup, $map);
}