diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-11-29 20:17:10 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-11-29 20:17:10 +0000 |
commit | 2d0df351d704ba34d191831f7d4b8cb385555be2 (patch) | |
tree | b18d02dfa6d075ff540eeffc4ab38393e53a3da0 /includes/unicode.inc | |
parent | 236da7af059e6cf3aba6e8ec923e082b1f8fe143 (diff) | |
download | brdo-2d0df351d704ba34d191831f7d4b8cb385555be2.tar.gz brdo-2d0df351d704ba34d191831f7d4b8cb385555be2.tar.bz2 |
- Various fixes. Updated CHANGELOG.txt
Diffstat (limited to 'includes/unicode.inc')
-rw-r--r-- | includes/unicode.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/unicode.inc b/includes/unicode.inc index 3508aad64..0c562a8c1 100644 --- a/includes/unicode.inc +++ b/includes/unicode.inc @@ -303,6 +303,10 @@ function _decode_entities($prefix, $codepoint, $original, &$table, &$exclude) { if ($prefix == '#x') { $codepoint = base_convert($codepoint, 16, 10); } + // Decimal numerical entity (strip leading zeros to avoid PHP octal notation) + else { + $codepoint = preg_replace('/^0+/', '', $codepoint); + } // Encode codepoint as UTF-8 bytes if ($codepoint < 0x80) { $str = chr($codepoint); |