mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-05 13:47:24 +02:00
Refactor encoding and entity specific processing to HTMLPurifier_Encoder. We also need to refactor the escaping to this class too.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@339 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -30,6 +30,7 @@ class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer
|
||||
|
||||
public function __construct() {
|
||||
// setup the factory
|
||||
parent::HTMLPurifier_Lexer();
|
||||
$this->factory = new HTMLPurifier_TokenFactory();
|
||||
}
|
||||
|
||||
@@ -50,10 +51,10 @@ class HTMLPurifier_Lexer_DOMLex extends HTMLPurifier_Lexer
|
||||
// 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);
|
||||
$string = $this->_encoder->substituteNonSpecialEntities($string);
|
||||
|
||||
// clean it into well-formed UTF-8 string
|
||||
$string = $this->cleanUTF8($string);
|
||||
$string = $this->_encoder->cleanUTF8($string);
|
||||
|
||||
// preprocess string, essential for UTF-8
|
||||
$string =
|
||||
|
Reference in New Issue
Block a user