function decode_entities

cis7 decode_entities($text)
cle7 decode_entities($text)
elmsmedia7 decode_entities($text)
icor7 decode_entities($text)
meedjum_blog7 decode_entities($text)
mooc7 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>).


$text: The text to decode entities in.

Return value

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

29 calls to decode_entities()
comment_submit in modules/comment/comment.module
Prepare a comment for submission.
DrupalWebTestCase::checkForMetaRefresh in modules/simpletest/drupal_web_test_case.php
Check for meta refresh tag and if found call drupalGet() recursively. This function looks for the http-equiv attribute to be set to "Refresh" and is case-sensitive.
drupal_html_to_text in includes/
Transforms an HTML string into plain text, preserving its structure.
entityreference_autocomplete_callback_get_matches in sites/all/modules/ulmus/entityreference/entityreference.module
Return JSON based on given field, instance and string.
EntityValueWrapper::value in sites/all/modules/ulmus/entity/includes/
Overrides EntityMetadataWrapper#value(). Sanitizes or decode textual data if necessary.

... See full list

2 string references to 'decode_entities'
devel_watchdog in sites/all/modules/ulmus/devel/devel.module
Implements hook_watchdog().
filter_xss_bad_protocol in includes/
Processes an HTML attribute value and strips dangerous protocols from URLs.


includes/, line 458
Provides Unicode-related conversions and operations.


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