ConverterHtmlPurifier Class Reference
[HtmlPurifier]
Convert HTML to purified HTML. More...
Inheritance diagram for
ConverterHtmlPurifier:
Public Member Functions |
|
decode ($value, $params=false) | |
This function does nothing! Especially it
does NOT purify HTML! |
|
encode ($value, $params=false) | |
Purify HTML. |
Detailed Description
Convert HTML to purified HTML.
Definition at line 8 of file htmlpurifier.converter.php.
Member Function Documentation
ConverterHtmlPurifier::decode | ( | $ | value, | |
$ | params = false |
|||
) |
This function does nothing! Especially it does NOT purify HTML!
Implements IConverter.
Definition at line 35 of file htmlpurifier.converter.php.
ConverterHtmlPurifier::encode | ( | $ | value, | |
$ | params = false |
|||
) |
Purify HTML.
- Parameters:
-
string $value array See http://htmlpurifier.org/live/configdoc/plain.html for all possible values
Implements IConverter.
Reimplemented in ConverterHtmlPurifierAutoParagraph.
Definition at line 15 of file htmlpurifier.converter.php.
00015 { 00016 require_once Load::get_module_dir('text.htmlpurifier') . '3rdparty/htmlpurifier-4/HTMLPurifier.standalone.php'; 00017 00018 $config = HTMLPurifier_Config::createDefault(); 00019 $config->set('Core.Encoding', GyroLocale::get_charset()); 00020 $config->set('Cache.SerializerPath', Config::get_value(Config::TEMP_DIR) . 'htmlpurifier'); 00021 00022 $config->set('HTML.TidyLevel', 'medium'); 00023 00024 $config->loadArray(Arr::force($params, false)); 00025 00026 $purifier = new HTMLPurifier($config); 00027 $value = $purifier->purify($value); 00028 00029 return $value; 00030 }
The documentation for this class was generated from the following file:
- contributions/text.htmlpurifier/lib/helpers/converters/htmlpurifier.converter.php