~glennpratt/pressflow/module_implements-cache

« back to all changes in this revision

Viewing changes to includes/unicode.inc

  • Committer: David Strauss
  • Date: 2010-08-11 21:05:18 UTC
  • mfrom: (1.1.13 6-stable)
  • Revision ID: david@fourkitchens.com-20100811210518-om46mcyxbvoe88v0
MergeĀ DrupalĀ 6.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Id: unicode.inc,v 1.29 2007/12/28 12:02:50 dries Exp $
 
2
// $Id: unicode.inc,v 1.29.2.1 2010/06/30 09:04:38 goba Exp $
3
3
 
4
4
/**
5
5
 * Indicates an error during check for PHP unicode support.
319
319
}
320
320
 
321
321
/**
322
 
 * Decode all HTML entities (including numerical ones) to regular UTF-8 bytes.
323
 
 * Double-escaped entities will only be decoded once ("&amp;lt;" becomes "&lt;", not "<").
 
322
 * Decodes all HTML entities (including numerical ones) to regular UTF-8 bytes.
 
323
 *
 
324
 * Double-escaped entities will only be decoded once ("&amp;lt;" becomes "&lt;",
 
325
 * not "<"). Be careful when using this function, as decode_entities can revert
 
326
 * previous sanitization efforts (&lt;script&gt; will become <script>).
324
327
 *
325
328
 * @param $text
326
329
 *   The text to decode entities in.
327
330
 * @param $exclude
328
331
 *   An array of characters which should not be decoded. For example,
329
332
 *   array('<', '&', '"'). This affects both named and numerical entities.
 
333
 *
 
334
 * @return
 
335
 *   The input $text, with all HTML entities decoded once.
330
336
 */
331
337
function decode_entities($text, $exclude = array()) {
332
338
  static $table;