Skip navigation
Help

decode_entities

6 unicode.inc decode_entities($text, $exclude = array())
7 unicode.inc decode_entities($text)

Decodes all HTML entities (including numerical ones) to regular UTF-8 bytes.

Double-escaped entities will only be decoded once ("&amp;lt;" becomes "&lt;", not "<"). Be careful when using this function, as decode_entities can revert previous sanitization efforts (&lt;script&gt; will become <script>).

Parameters

$text: The text to decode entities in.

Return value

The input $text, with all HTML entities decoded once.

14 calls to decode_entities()

1 string reference to 'decode_entities'

File

drupal/includes/unicode.inc, line 428

Code

function decode_entities($text) {
  return html_entity_decode($text, ENT_QUOTES, 'UTF-8');
}