From 2d0df351d704ba34d191831f7d4b8cb385555be2 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 29 Nov 2005 20:17:10 +0000 Subject: - Various fixes. Updated CHANGELOG.txt --- includes/unicode.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'includes/unicode.inc') 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); -- cgit v1.2.3