From f145f64bf482e10f91410f2ea5fbd0652278fa24 Mon Sep 17 00:00:00 2001 From: mpyw Date: Sat, 4 Mar 2017 15:38:01 +0900 Subject: [PATCH] Fix #122: correct surrogate pair range --- library/HTMLPurifier/Encoder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/HTMLPurifier/Encoder.php b/library/HTMLPurifier/Encoder.php index fef9b589..054986ea 100644 --- a/library/HTMLPurifier/Encoder.php +++ b/library/HTMLPurifier/Encoder.php @@ -255,7 +255,7 @@ class HTMLPurifier_Encoder // 7F-9F is not strictly prohibited by XML, // but it is non-SGML, and thus we don't allow it (0xA0 <= $mUcs4 && 0xD7FF >= $mUcs4) || - (0x10000 <= $mUcs4 && 0x10FFFF >= $mUcs4) + (0xE000 <= $mUcs4 && 0x10FFFF >= $mUcs4) ) ) { $out .= $char;