mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-05 13:47:24 +02:00
Malformed UTF-8 and non-SGML character detection and cleaning implemented
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@303 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -47,6 +47,14 @@ class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer
|
||||
// mode won't get 'em.
|
||||
$string = $this->escapeCDATA($string);
|
||||
|
||||
// substitute non-special entities. While DOM is perfectly capable
|
||||
// of doing this, we need to get at the UTF-8 characters in
|
||||
// cleanUTF8
|
||||
$string = $this->substituteNonSpecialEntities($string);
|
||||
|
||||
// clean it into well-formed UTF-8 string
|
||||
$string = $this->cleanUTF8($string);
|
||||
|
||||
if (!$is_full) {
|
||||
// preprocess string, essential for UTF-8
|
||||
$string =
|
||||
|
Reference in New Issue
Block a user