mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-09 23:28:42 +00:00
- Switch to HTMLPurifier.php, a more logical "must include" for the tester
- Disable encoding options, we're going to defer implementation of them for a later release. git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@329 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
7588068b7b
commit
15988980db
@ -28,25 +28,47 @@ 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',
|
||||
'Defines the input and output character encodings to use. HTMLPurifier '.
|
||||
'internally uses UTF-8, making that the painless default choice. Note '.
|
||||
'certain implementations of HTMLPurifier_Lexer are intelligent enough '.
|
||||
'automatically detect encoding, however, output format will always be '.
|
||||
'this value.'
|
||||
'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).'
|
||||
);
|
||||
HTMLPurifier_ConfigDef::defineAllowedValues(
|
||||
|
||||
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(
|
||||
);
|
||||
HTMLPurifier_ConfigDef::defineValueAliases(
|
||||
'Core', 'Encoding', array(
|
||||
'iso8859-1' => 'iso-8859-1'
|
||||
)
|
||||
);
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* Main library execution class.
|
||||
|
@ -35,7 +35,7 @@ function generate_mock_once($name) {
|
||||
}
|
||||
|
||||
// this has to be defined before we do any includes of library files
|
||||
require_once 'HTMLPurifier/ConfigDef.php';
|
||||
require_once 'HTMLPurifier.php';
|
||||
|
||||
// define callable test files
|
||||
$test_files = array();
|
||||
|
Loading…
Reference in New Issue
Block a user