1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-04 21:28:06 +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:
Edward Z. Yang
2006-08-29 19:36:40 +00:00
parent 55503744ee
commit 1de3088276
12 changed files with 495 additions and 502 deletions

View File

@@ -28,48 +28,6 @@ require_once 'HTMLPurifier/HTMLDefinition.php';
require_once 'HTMLPurifier/Generator.php';
require_once 'HTMLPurifier/Strategy/Core.php';
/*
// Darn you fellas still using ISO-8859-1! It would be so easy for me
// to just drop the characters that can't be expressed this way, but I'm
// a stickler for code quality, so I won't do that to you. You'll have
// to wait for this functionality to be implemented later.
HTMLPurifier_ConfigDef::define(
'Core', 'Encoding', 'utf-8', 'istring',
'Set this to the encoding your webpages are served as. This defines '.
'the encoding the HTMLPurifier will convert to and from before passing '.
'the text back to you. Note that although we offer full HTML document '.
'parsing functionality, we ignore meta tags in such documents, because '.
'most modern browsers have already re-encoded the file in the correct '.
'encoding (though it did not change the meta tag). '.
'Since browsers do not alter file uploads, '.
'HTML from a file will fail fantastically if its real encoding is does '.
'match the encoding passed here (which is often the case).'
);
if ( !function_exists('iconv') ) {
// these are the only encodings we offer native PHP support for.
// if iconv is enabled, iconv's encoding support dictates what we can
// use.
HTMLPurifier_ConfigDef::defineAllowedValues(
'Core', 'Encoding', array(
'utf-8',
'iso-8859-1'
)
);
HTMLPurifier_ConfigDef::defineValueAliases(
'Core', 'Encoding', array(
'iso8859-1' => 'iso-8859-1'
)
);
}
*/
/**
* Main library execution class.
*