summaryrefslogtreecommitdiff
path: root/includes/unicode.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-11-05 12:58:59 +0000
committerDries Buytaert <dries@buytaert.net>2008-11-05 12:58:59 +0000
commit3f6359f3fb1a96393de5cf459456cd7a9f349d10 (patch)
treee4442e549778b330b537ac580661d24d88cb9fc9 /includes/unicode.inc
parentd31c77513b14d3424474bf65d207e6b0f9b585ac (diff)
downloadbrdo-3f6359f3fb1a96393de5cf459456cd7a9f349d10.tar.gz
brdo-3f6359f3fb1a96393de5cf459456cd7a9f349d10.tar.bz2
- Patch #330040 by earnie: code comment improvements.
Diffstat (limited to 'includes/unicode.inc')
-rw-r--r--includes/unicode.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/unicode.inc b/includes/unicode.inc
index f54ce1f1f..2912cde97 100644
--- a/includes/unicode.inc
+++ b/includes/unicode.inc
@@ -335,7 +335,10 @@ function decode_entities($text, $exclude = array()) {
}
$newtable = array_diff($table, $exclude);
- // Use a regexp to select all entities in one pass, to avoid decoding double-escaped entities twice.
+ // Use a regexp to select all entities in one pass, to avoid decoding
+ // double-escaped entities twice. The PREG_REPLACE_EVAL modifier 'e' is
+ // being used to allow for a callback (see
+ // http://php.net/manual/en/reference.pcre.pattern.modifiers).
return preg_replace('/&(#x?)?([A-Za-z0-9]+);/e', '_decode_entities("$1", "$2", "$0", $newtable, $exclude)', $text);
}