From 30eb982961f9eca33aba6b62a5d35bfbb21360c9 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Mon, 25 Feb 2008 21:58:17 +0000 Subject: [PATCH] [3.1.0] Add support for !important, with %CSS.AllowImportant git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1578 48356398-32a2-884e-a903-53898d9a118a --- NEWS | 2 + library/HTMLPurifier.includes.php | 1 + .../AttrDef/CSS/ImportantDecorator.php | 38 +++++++++++++++ library/HTMLPurifier/CSSDefinition.php | 6 +++ library/HTMLPurifier/ConfigSchema/schema.ser | 2 +- .../schema/CSS.AllowImportant.txt | 7 +++ .../AttrDef/CSS/ImportantDecoratorTest.php | 48 +++++++++++++++++++ tests/HTMLPurifier/AttrDef/CSSTest.php | 16 +++++-- tests/test_files.php | 1 + 9 files changed, 117 insertions(+), 4 deletions(-) create mode 100644 library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php create mode 100644 library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt create mode 100644 tests/HTMLPurifier/AttrDef/CSS/ImportantDecoratorTest.php diff --git a/NEWS b/NEWS index 5795bf18..6acb562a 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier ! Limited support for proprietary HTML elements, namely , sponsored by Chris. You can enable them with %HTML.Proprietary if your client demands them. +! Support for !important CSS cascade modifier. By default, this will be stripped + from CSS, but you can enable it using %CSS.AllowImportant - Autoclose now operates iteratively, i.e.
now has both span tags closed. - Various HTMLPurifier_Config convenience functions now accept another parameter diff --git a/library/HTMLPurifier.includes.php b/library/HTMLPurifier.includes.php index 8d37999a..c8703014 100644 --- a/library/HTMLPurifier.includes.php +++ b/library/HTMLPurifier.includes.php @@ -81,6 +81,7 @@ require 'HTMLPurifier/AttrDef/CSS/Composite.php'; require 'HTMLPurifier/AttrDef/CSS/Filter.php'; require 'HTMLPurifier/AttrDef/CSS/Font.php'; require 'HTMLPurifier/AttrDef/CSS/FontFamily.php'; +require 'HTMLPurifier/AttrDef/CSS/ImportantDecorator.php'; require 'HTMLPurifier/AttrDef/CSS/Length.php'; require 'HTMLPurifier/AttrDef/CSS/ListStyle.php'; require 'HTMLPurifier/AttrDef/CSS/Multiple.php'; diff --git a/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php b/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php new file mode 100644 index 00000000..383d56ab --- /dev/null +++ b/library/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php @@ -0,0 +1,38 @@ +def = $def; + $this->allow = $allow; + } + /** + * Intercepts and removes !important if necessary + */ + public function validate($string, $config, $context) { + // test for ! and important tokens + $string = trim($string); + $is_important = false; + // :TODO: optimization: test directly for !important and ! important + if (strlen($string) >= 9 && substr($string, -9) === 'important') { + $temp = rtrim(substr($string, 0, -9)); + // use a temp, because we might want to restore important + if (strlen($temp) >= 1 && substr($temp, -1) === '!') { + $string = rtrim(substr($temp, 0, -1)); + $is_important = true; + } + } + $string = $this->def->validate($string, $config, $context); + if ($this->allow && $is_important) $string .= ' !important'; + return $string; + } +} diff --git a/library/HTMLPurifier/CSSDefinition.php b/library/HTMLPurifier/CSSDefinition.php index 955c8c66..70d164ea 100644 --- a/library/HTMLPurifier/CSSDefinition.php +++ b/library/HTMLPurifier/CSSDefinition.php @@ -202,6 +202,12 @@ class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition $this->doSetupProprietary($config); } + $allow_important = $config->get('CSS', 'AllowImportant'); + // wrap all attr-defs with decorator that handles !important + foreach ($this->info as $k => $v) { + $this->info[$k] = new HTMLPurifier_AttrDef_CSS_ImportantDecorator($v, $allow_important); + } + } protected function doSetupProprietary($config) { diff --git a/library/HTMLPurifier/ConfigSchema/schema.ser b/library/HTMLPurifier/ConfigSchema/schema.ser index 1f528226..8eba2a9b 100644 --- a/library/HTMLPurifier/ConfigSchema/schema.ser +++ b/library/HTMLPurifier/ConfigSchema/schema.ser @@ -1 +1 @@ -O:25:"HTMLPurifier_ConfigSchema":4:{s:8:"defaults";a:11:{s:4:"Attr";a:11:{s:19:"AllowedFrameTargets";a:0:{}s:10:"AllowedRel";a:0:{}s:10:"AllowedRev";a:0:{}s:19:"DefaultInvalidImage";s:0:"";s:22:"DefaultInvalidImageAlt";s:13:"Invalid image";s:14:"DefaultTextDir";s:3:"ltr";s:8:"EnableID";b:0;s:11:"IDBlacklist";a:0:{}s:17:"IDBlacklistRegexp";N;s:8:"IDPrefix";s:0:"";s:13:"IDPrefixLocal";s:0:"";}s:10:"AutoFormat";a:4:{s:13:"AutoParagraph";b:0;s:6:"Custom";a:0:{}s:7:"Linkify";b:0;s:15:"PurifierLinkify";b:0;}s:15:"AutoFormatParam";a:1:{s:21:"PurifierLinkifyDocURL";s:3:"#%s";}s:3:"CSS";a:2:{s:13:"DefinitionRev";i:1;s:11:"Proprietary";b:0;}s:5:"Cache";a:2:{s:14:"DefinitionImpl";s:10:"Serializer";s:14:"SerializerPath";N;}s:4:"Core";a:15:{s:17:"AggressivelyFixLt";b:0;s:13:"CollectErrors";b:0;s:13:"ColorKeywords";a:17:{s:6:"maroon";s:7:"#800000";s:3:"red";s:7:"#FF0000";s:6:"orange";s:7:"#FFA500";s:6:"yellow";s:7:"#FFFF00";s:5:"olive";s:7:"#808000";s:6:"purple";s:7:"#800080";s:7:"fuchsia";s:7:"#FF00FF";s:5:"white";s:7:"#FFFFFF";s:4:"lime";s:7:"#00FF00";s:5:"green";s:7:"#008000";s:4:"navy";s:7:"#000080";s:4:"blue";s:7:"#0000FF";s:4:"aqua";s:7:"#00FFFF";s:4:"teal";s:7:"#008080";s:5:"black";s:7:"#000000";s:6:"silver";s:7:"#C0C0C0";s:4:"gray";s:7:"#808080";}s:25:"ConvertDocumentToFragment";b:1;s:31:"DirectLexLineNumberSyncInterval";i:0;s:8:"Encoding";s:5:"utf-8";s:21:"EscapeInvalidChildren";b:0;s:17:"EscapeInvalidTags";b:0;s:24:"EscapeNonASCIICharacters";b:0;s:14:"HiddenElements";a:2:{s:6:"script";b:1;s:5:"style";b:1;}s:8:"Language";s:2:"en";s:9:"LexerImpl";N;s:19:"MaintainLineNumbers";N;s:16:"RemoveInvalidImg";b:1;s:20:"RemoveScriptContents";N;}s:6:"Filter";a:2:{s:26:"ExtractStyleBlocksEscaping";b:1;s:23:"ExtractStyleBlocksScope";N;}s:4:"HTML";a:18:{s:7:"Allowed";N;s:17:"AllowedAttributes";N;s:15:"AllowedElements";N;s:14:"AllowedModules";N;s:12:"BlockWrapper";s:1:"p";s:11:"CoreModules";a:7:{s:9:"Structure";b:1;s:4:"Text";b:1;s:9:"Hypertext";b:1;s:4:"List";b:1;s:22:"NonXMLCommonAttributes";b:1;s:19:"XMLCommonAttributes";b:1;s:16:"CommonAttributes";b:1;}s:13:"CustomDoctype";N;s:12:"DefinitionID";N;s:13:"DefinitionRev";i:1;s:7:"Doctype";s:0:"";s:6:"Parent";s:3:"div";s:11:"Proprietary";b:0;s:6:"Strict";b:0;s:7:"TidyAdd";a:0:{}s:9:"TidyLevel";s:6:"medium";s:10:"TidyRemove";a:0:{}s:7:"Trusted";b:0;s:5:"XHTML";b:1;}s:6:"Output";a:3:{s:21:"CommentScriptContents";b:1;s:7:"Newline";N;s:10:"TidyFormat";b:0;}s:4:"Test";a:1:{s:12:"ForceNoIconv";b:0;}s:3:"URI";a:14:{s:14:"AllowedSchemes";a:6:{s:4:"http";b:1;s:5:"https";b:1;s:6:"mailto";b:1;s:3:"ftp";b:1;s:4:"nntp";b:1;s:4:"news";b:1;}s:4:"Base";N;s:13:"DefaultScheme";s:4:"http";s:12:"DefinitionID";N;s:13:"DefinitionRev";i:1;s:7:"Disable";b:0;s:15:"DisableExternal";b:0;s:24:"DisableExternalResources";b:0;s:16:"DisableResources";b:0;s:4:"Host";N;s:13:"HostBlacklist";a:0:{}s:12:"MakeAbsolute";b:0;s:5:"Munge";N;s:22:"OverrideAllowedSchemes";b:1;}}s:4:"info";a:11:{s:4:"Attr";a:12:{s:19:"AllowedFrameTargets";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:10:"AllowedRel";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:10:"AllowedRev";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:19:"DefaultInvalidImage";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:22:"DefaultInvalidImageAlt";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:14:"DefaultTextDir";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";a:2:{s:3:"ltr";b:1;s:3:"rtl";b:1;}s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:8:"EnableID";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:17:"HTML.EnableAttrID";}}s:11:"IDBlacklist";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"list";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:17:"IDBlacklistRegexp";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:8:"IDPrefix";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"IDPrefixLocal";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:10:"DisableURI";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:3:"URI";s:4:"name";s:7:"Disable";}}s:10:"AutoFormat";a:4:{s:13:"AutoParagraph";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:6:"Custom";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"list";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:7:"Linkify";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:15:"PurifierLinkify";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}s:15:"AutoFormatParam";a:1:{s:21:"PurifierLinkifyDocURL";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}s:3:"CSS";a:2:{s:13:"DefinitionRev";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:3:"int";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:11:"Proprietary";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}s:5:"Cache";a:2:{s:14:"DefinitionImpl";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:20:"Core.DefinitionCache";}}s:14:"SerializerPath";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}s:4:"Core";a:20:{s:15:"DefinitionCache";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:5:"Cache";s:4:"name";s:14:"DefinitionImpl";}s:17:"AggressivelyFixLt";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"CollectErrors";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"ColorKeywords";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"hash";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:25:"ConvertDocumentToFragment";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:24:"Core.AcceptFullDocuments";}}s:19:"AcceptFullDocuments";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:4:"Core";s:4:"name";s:25:"ConvertDocumentToFragment";}s:31:"DirectLexLineNumberSyncInterval";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:3:"int";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:8:"Encoding";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:7:"istring";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:21:"EscapeInvalidChildren";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:17:"EscapeInvalidTags";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:24:"EscapeNonASCIICharacters";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:14:"HiddenElements";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:8:"Language";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:9:"LexerImpl";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:5:"mixed";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:19:"MaintainLineNumbers";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:16:"RemoveInvalidImg";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:20:"RemoveScriptContents";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:5:"XHTML";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:4:"HTML";s:4:"name";s:5:"XHTML";}s:21:"CommentScriptContents";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:6:"Output";s:4:"name";s:21:"CommentScriptContents";}s:10:"TidyFormat";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:6:"Output";s:4:"name";s:10:"TidyFormat";}}s:6:"Filter";a:2:{s:26:"ExtractStyleBlocksEscaping";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:23:"ExtractStyleBlocksScope";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}s:4:"HTML";a:19:{s:12:"EnableAttrID";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:4:"Attr";s:4:"name";s:8:"EnableID";}s:7:"Allowed";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:5:"itext";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:17:"AllowedAttributes";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:15:"AllowedElements";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:14:"AllowedModules";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:12:"BlockWrapper";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:11:"CoreModules";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"CustomDoctype";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:12:"DefinitionID";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"DefinitionRev";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:3:"int";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:7:"Doctype";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";a:6:{s:0:"";b:1;s:22:"HTML 4.01 Transitional";b:1;s:16:"HTML 4.01 Strict";b:1;s:22:"XHTML 1.0 Transitional";b:1;s:16:"XHTML 1.0 Strict";b:1;s:9:"XHTML 1.1";b:1;}s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:6:"Parent";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:11:"Proprietary";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:6:"Strict";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:7:"TidyAdd";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:9:"TidyLevel";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";a:4:{s:4:"none";b:1;s:5:"light";b:1;s:6:"medium";b:1;s:5:"heavy";b:1;}s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:10:"TidyRemove";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:7:"Trusted";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:5:"XHTML";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:10:"Core.XHTML";}}}s:6:"Output";a:3:{s:21:"CommentScriptContents";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:26:"Core.CommentScriptContents";}}s:7:"Newline";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:10:"TidyFormat";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:15:"Core.TidyFormat";}}}s:4:"Test";a:1:{s:12:"ForceNoIconv";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}s:3:"URI";a:14:{s:14:"AllowedSchemes";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:4:"Base";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"DefaultScheme";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:12:"DefinitionID";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"DefinitionRev";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:3:"int";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:7:"Disable";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:15:"Attr.DisableURI";}}s:15:"DisableExternal";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:24:"DisableExternalResources";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:16:"DisableResources";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:4:"Host";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"HostBlacklist";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"list";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:12:"MakeAbsolute";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:5:"Munge";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:22:"OverrideAllowedSchemes";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}}s:14:"info_namespace";a:11:{s:4:"Attr";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:40:"Features regarding attribute validation.";}s:10:"AutoFormat";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:97:"Configuration for activating auto-formatting functionality (also known as Injectors)";}s:15:"AutoFormatParam";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:59:"Configuration for customizing auto-formatting functionality";}s:3:"CSS";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:36:"Configuration regarding allowed CSS.";}s:5:"Cache";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:57:"Configuration for DefinitionCache and related subclasses.";}s:4:"Core";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:40:"Core features that are always available.";}s:6:"Filter";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:25:"Configuration for filters";}s:4:"HTML";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:37:"Configuration regarding allowed HTML.";}s:6:"Output";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:52:"Configuration relating to the generation of (X)HTML.";}s:4:"Test";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:51:"Developer testing configuration for our unit tests.";}s:3:"URI";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:48:"Features regarding Uniform Resource Identifiers.";}}s:5:"types";a:11:{s:6:"string";s:6:"String";s:7:"istring";s:23:"Case-insensitive string";s:4:"text";s:4:"Text";s:5:"itext";s:21:"Case-insensitive text";s:3:"int";s:7:"Integer";s:5:"float";s:5:"Float";s:4:"bool";s:7:"Boolean";s:6:"lookup";s:12:"Lookup array";s:4:"list";s:10:"Array list";s:4:"hash";s:17:"Associative array";s:5:"mixed";s:5:"Mixed";}} \ No newline at end of file +O:25:"HTMLPurifier_ConfigSchema":4:{s:8:"defaults";a:11:{s:4:"Attr";a:11:{s:19:"AllowedFrameTargets";a:0:{}s:10:"AllowedRel";a:0:{}s:10:"AllowedRev";a:0:{}s:19:"DefaultInvalidImage";s:0:"";s:22:"DefaultInvalidImageAlt";s:13:"Invalid image";s:14:"DefaultTextDir";s:3:"ltr";s:8:"EnableID";b:0;s:11:"IDBlacklist";a:0:{}s:17:"IDBlacklistRegexp";N;s:8:"IDPrefix";s:0:"";s:13:"IDPrefixLocal";s:0:"";}s:10:"AutoFormat";a:4:{s:13:"AutoParagraph";b:0;s:6:"Custom";a:0:{}s:7:"Linkify";b:0;s:15:"PurifierLinkify";b:0;}s:15:"AutoFormatParam";a:1:{s:21:"PurifierLinkifyDocURL";s:3:"#%s";}s:3:"CSS";a:3:{s:14:"AllowImportant";b:0;s:13:"DefinitionRev";i:1;s:11:"Proprietary";b:0;}s:5:"Cache";a:2:{s:14:"DefinitionImpl";s:10:"Serializer";s:14:"SerializerPath";N;}s:4:"Core";a:15:{s:17:"AggressivelyFixLt";b:0;s:13:"CollectErrors";b:0;s:13:"ColorKeywords";a:17:{s:6:"maroon";s:7:"#800000";s:3:"red";s:7:"#FF0000";s:6:"orange";s:7:"#FFA500";s:6:"yellow";s:7:"#FFFF00";s:5:"olive";s:7:"#808000";s:6:"purple";s:7:"#800080";s:7:"fuchsia";s:7:"#FF00FF";s:5:"white";s:7:"#FFFFFF";s:4:"lime";s:7:"#00FF00";s:5:"green";s:7:"#008000";s:4:"navy";s:7:"#000080";s:4:"blue";s:7:"#0000FF";s:4:"aqua";s:7:"#00FFFF";s:4:"teal";s:7:"#008080";s:5:"black";s:7:"#000000";s:6:"silver";s:7:"#C0C0C0";s:4:"gray";s:7:"#808080";}s:25:"ConvertDocumentToFragment";b:1;s:31:"DirectLexLineNumberSyncInterval";i:0;s:8:"Encoding";s:5:"utf-8";s:21:"EscapeInvalidChildren";b:0;s:17:"EscapeInvalidTags";b:0;s:24:"EscapeNonASCIICharacters";b:0;s:14:"HiddenElements";a:2:{s:6:"script";b:1;s:5:"style";b:1;}s:8:"Language";s:2:"en";s:9:"LexerImpl";N;s:19:"MaintainLineNumbers";N;s:16:"RemoveInvalidImg";b:1;s:20:"RemoveScriptContents";N;}s:6:"Filter";a:2:{s:26:"ExtractStyleBlocksEscaping";b:1;s:23:"ExtractStyleBlocksScope";N;}s:4:"HTML";a:18:{s:7:"Allowed";N;s:17:"AllowedAttributes";N;s:15:"AllowedElements";N;s:14:"AllowedModules";N;s:12:"BlockWrapper";s:1:"p";s:11:"CoreModules";a:7:{s:9:"Structure";b:1;s:4:"Text";b:1;s:9:"Hypertext";b:1;s:4:"List";b:1;s:22:"NonXMLCommonAttributes";b:1;s:19:"XMLCommonAttributes";b:1;s:16:"CommonAttributes";b:1;}s:13:"CustomDoctype";N;s:12:"DefinitionID";N;s:13:"DefinitionRev";i:1;s:7:"Doctype";s:0:"";s:6:"Parent";s:3:"div";s:11:"Proprietary";b:0;s:6:"Strict";b:0;s:7:"TidyAdd";a:0:{}s:9:"TidyLevel";s:6:"medium";s:10:"TidyRemove";a:0:{}s:7:"Trusted";b:0;s:5:"XHTML";b:1;}s:6:"Output";a:3:{s:21:"CommentScriptContents";b:1;s:7:"Newline";N;s:10:"TidyFormat";b:0;}s:4:"Test";a:1:{s:12:"ForceNoIconv";b:0;}s:3:"URI";a:14:{s:14:"AllowedSchemes";a:6:{s:4:"http";b:1;s:5:"https";b:1;s:6:"mailto";b:1;s:3:"ftp";b:1;s:4:"nntp";b:1;s:4:"news";b:1;}s:4:"Base";N;s:13:"DefaultScheme";s:4:"http";s:12:"DefinitionID";N;s:13:"DefinitionRev";i:1;s:7:"Disable";b:0;s:15:"DisableExternal";b:0;s:24:"DisableExternalResources";b:0;s:16:"DisableResources";b:0;s:4:"Host";N;s:13:"HostBlacklist";a:0:{}s:12:"MakeAbsolute";b:0;s:5:"Munge";N;s:22:"OverrideAllowedSchemes";b:1;}}s:4:"info";a:11:{s:4:"Attr";a:12:{s:19:"AllowedFrameTargets";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:10:"AllowedRel";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:10:"AllowedRev";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:19:"DefaultInvalidImage";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:22:"DefaultInvalidImageAlt";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:14:"DefaultTextDir";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";a:2:{s:3:"ltr";b:1;s:3:"rtl";b:1;}s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:8:"EnableID";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:17:"HTML.EnableAttrID";}}s:11:"IDBlacklist";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"list";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:17:"IDBlacklistRegexp";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:8:"IDPrefix";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"IDPrefixLocal";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:10:"DisableURI";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:3:"URI";s:4:"name";s:7:"Disable";}}s:10:"AutoFormat";a:4:{s:13:"AutoParagraph";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:6:"Custom";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"list";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:7:"Linkify";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:15:"PurifierLinkify";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}s:15:"AutoFormatParam";a:1:{s:21:"PurifierLinkifyDocURL";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}s:3:"CSS";a:3:{s:14:"AllowImportant";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"DefinitionRev";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:3:"int";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:11:"Proprietary";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}s:5:"Cache";a:2:{s:14:"DefinitionImpl";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:20:"Core.DefinitionCache";}}s:14:"SerializerPath";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}s:4:"Core";a:20:{s:15:"DefinitionCache";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:5:"Cache";s:4:"name";s:14:"DefinitionImpl";}s:17:"AggressivelyFixLt";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"CollectErrors";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"ColorKeywords";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"hash";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:25:"ConvertDocumentToFragment";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:24:"Core.AcceptFullDocuments";}}s:19:"AcceptFullDocuments";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:4:"Core";s:4:"name";s:25:"ConvertDocumentToFragment";}s:31:"DirectLexLineNumberSyncInterval";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:3:"int";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:8:"Encoding";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:7:"istring";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:21:"EscapeInvalidChildren";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:17:"EscapeInvalidTags";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:24:"EscapeNonASCIICharacters";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:14:"HiddenElements";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:8:"Language";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:9:"LexerImpl";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:5:"mixed";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:19:"MaintainLineNumbers";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:16:"RemoveInvalidImg";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:20:"RemoveScriptContents";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:5:"XHTML";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:4:"HTML";s:4:"name";s:5:"XHTML";}s:21:"CommentScriptContents";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:6:"Output";s:4:"name";s:21:"CommentScriptContents";}s:10:"TidyFormat";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:6:"Output";s:4:"name";s:10:"TidyFormat";}}s:6:"Filter";a:2:{s:26:"ExtractStyleBlocksEscaping";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:23:"ExtractStyleBlocksScope";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}s:4:"HTML";a:19:{s:12:"EnableAttrID";O:37:"HTMLPurifier_ConfigDef_DirectiveAlias":3:{s:5:"class";s:5:"alias";s:9:"namespace";s:4:"Attr";s:4:"name";s:8:"EnableID";}s:7:"Allowed";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:5:"itext";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:17:"AllowedAttributes";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:15:"AllowedElements";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:14:"AllowedModules";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:12:"BlockWrapper";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:11:"CoreModules";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"CustomDoctype";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:12:"DefinitionID";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"DefinitionRev";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:3:"int";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:7:"Doctype";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";a:6:{s:0:"";b:1;s:22:"HTML 4.01 Transitional";b:1;s:16:"HTML 4.01 Strict";b:1;s:22:"XHTML 1.0 Transitional";b:1;s:16:"XHTML 1.0 Strict";b:1;s:9:"XHTML 1.1";b:1;}s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:6:"Parent";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:11:"Proprietary";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:6:"Strict";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:7:"TidyAdd";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:9:"TidyLevel";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";a:4:{s:4:"none";b:1;s:5:"light";b:1;s:6:"medium";b:1;s:5:"heavy";b:1;}s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:10:"TidyRemove";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:7:"Trusted";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:5:"XHTML";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:10:"Core.XHTML";}}}s:6:"Output";a:3:{s:21:"CommentScriptContents";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:26:"Core.CommentScriptContents";}}s:7:"Newline";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:10:"TidyFormat";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:15:"Core.TidyFormat";}}}s:4:"Test";a:1:{s:12:"ForceNoIconv";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}s:3:"URI";a:14:{s:14:"AllowedSchemes";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"lookup";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:4:"Base";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"DefaultScheme";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:12:"DefinitionID";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"DefinitionRev";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:3:"int";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:7:"Disable";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:1:{i:0;s:15:"Attr.DisableURI";}}s:15:"DisableExternal";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:24:"DisableExternalResources";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:16:"DisableResources";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:4:"Host";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:13:"HostBlacklist";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"list";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:12:"MakeAbsolute";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:5:"Munge";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:6:"string";s:11:"description";N;s:10:"allow_null";b:1;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}s:22:"OverrideAllowedSchemes";O:32:"HTMLPurifier_ConfigDef_Directive":7:{s:5:"class";s:9:"directive";s:4:"type";s:4:"bool";s:11:"description";N;s:10:"allow_null";b:0;s:7:"allowed";b:1;s:7:"aliases";a:0:{}s:16:"directiveAliases";a:0:{}}}}s:14:"info_namespace";a:11:{s:4:"Attr";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:40:"Features regarding attribute validation.";}s:10:"AutoFormat";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:97:"Configuration for activating auto-formatting functionality (also known as Injectors)";}s:15:"AutoFormatParam";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:59:"Configuration for customizing auto-formatting functionality";}s:3:"CSS";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:36:"Configuration regarding allowed CSS.";}s:5:"Cache";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:57:"Configuration for DefinitionCache and related subclasses.";}s:4:"Core";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:40:"Core features that are always available.";}s:6:"Filter";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:25:"Configuration for filters";}s:4:"HTML";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:37:"Configuration regarding allowed HTML.";}s:6:"Output";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:52:"Configuration relating to the generation of (X)HTML.";}s:4:"Test";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:51:"Developer testing configuration for our unit tests.";}s:3:"URI";O:32:"HTMLPurifier_ConfigDef_Namespace":2:{s:5:"class";s:9:"namespace";s:11:"description";s:48:"Features regarding Uniform Resource Identifiers.";}}s:5:"types";a:11:{s:6:"string";s:6:"String";s:7:"istring";s:23:"Case-insensitive string";s:4:"text";s:4:"Text";s:5:"itext";s:21:"Case-insensitive text";s:3:"int";s:7:"Integer";s:5:"float";s:5:"Float";s:4:"bool";s:7:"Boolean";s:6:"lookup";s:12:"Lookup array";s:4:"list";s:10:"Array list";s:4:"hash";s:17:"Associative array";s:5:"mixed";s:5:"Mixed";}} \ No newline at end of file diff --git a/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt b/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt new file mode 100644 index 00000000..68fcde1b --- /dev/null +++ b/library/HTMLPurifier/ConfigSchema/schema/CSS.AllowImportant.txt @@ -0,0 +1,7 @@ +CSS.AllowImportant +TYPE: bool +DEFAULT: false +VERSION: 3.1.0 +--DESCRIPTION-- +This parameter determines whether or not !important cascade modifiers should +be allowed in user CSS. If false, !important will stripped. diff --git a/tests/HTMLPurifier/AttrDef/CSS/ImportantDecoratorTest.php b/tests/HTMLPurifier/AttrDef/CSS/ImportantDecoratorTest.php new file mode 100644 index 00000000..ae176723 --- /dev/null +++ b/tests/HTMLPurifier/AttrDef/CSS/ImportantDecoratorTest.php @@ -0,0 +1,48 @@ +mock = new HTMLPurifier_AttrDefMock(); + $this->def = new HTMLPurifier_AttrDef_CSS_ImportantDecorator($this->mock, true); + } + + protected function setMock($input, $output = null) { + if ($output === null) $output = $input; + $this->mock->expectOnce('validate', array($input, $this->config, $this->context)); + $this->mock->setReturnValue('validate', $output); + } + + function testImportant() { + $this->setMock('23'); + $this->assertDef('23 !important'); + } + + function testImportantInternalDefChanged() { + $this->setMock('23', '24'); + $this->assertDef('23 !important', '24 !important'); + } + + function testImportantWithSpace() { + $this->setMock('23'); + $this->assertDef('23 ! important ', '23 !important'); + } + + function testFakeImportant() { + $this->setMock('! foo important'); + $this->assertDef('! foo important'); + } + + function testStrip() { + $this->def = new HTMLPurifier_AttrDef_CSS_ImportantDecorator($this->mock, false); + $this->setMock('23'); + $this->assertDef('23 ! important ', '23'); + } + +} + diff --git a/tests/HTMLPurifier/AttrDef/CSSTest.php b/tests/HTMLPurifier/AttrDef/CSSTest.php index bf940bfb..5f8a2b59 100644 --- a/tests/HTMLPurifier/AttrDef/CSSTest.php +++ b/tests/HTMLPurifier/AttrDef/CSSTest.php @@ -3,9 +3,12 @@ class HTMLPurifier_AttrDef_CSSTest extends HTMLPurifier_AttrDefHarness { - function test() { - + function setup() { + parent::setup(); $this->def = new HTMLPurifier_AttrDef_CSS(); + } + + function test() { // regular cases, singular $this->assertDef('text-align:right;'); @@ -107,11 +110,13 @@ class HTMLPurifier_AttrDef_CSSTest extends HTMLPurifier_AttrDefHarness // case-insensitivity $this->assertDef('FLOAT:LEFT;', 'float:left;'); + // !important stripping + $this->assertDef('float:left !important;', 'float:left;'); + } function testProprietary() { $this->config->set('CSS', 'Proprietary', true); - $this->def = new HTMLPurifier_AttrDef_CSS(); $this->assertDef('scrollbar-arrow-color:#ff0;'); $this->assertDef('scrollbar-base-color:#ff6347;'); @@ -127,5 +132,10 @@ class HTMLPurifier_AttrDef_CSSTest extends HTMLPurifier_AttrDefHarness } + function testImportant() { + $this->config->set('CSS', 'AllowImportant', true); + $this->assertDef('float:left !important;'); + } + } diff --git a/tests/test_files.php b/tests/test_files.php index 9db2c0cc..dcfe4352 100644 --- a/tests/test_files.php +++ b/tests/test_files.php @@ -18,6 +18,7 @@ $test_files[] = 'HTMLPurifier/AttrDef/CSS/CompositeTest.php'; $test_files[] = 'HTMLPurifier/AttrDef/CSS/FilterTest.php'; $test_files[] = 'HTMLPurifier/AttrDef/CSS/FontFamilyTest.php'; $test_files[] = 'HTMLPurifier/AttrDef/CSS/FontTest.php'; +$test_files[] = 'HTMLPurifier/AttrDef/CSS/ImportantDecoratorTest.php'; $test_files[] = 'HTMLPurifier/AttrDef/CSS/LengthTest.php'; $test_files[] = 'HTMLPurifier/AttrDef/CSS/ListStyleTest.php'; $test_files[] = 'HTMLPurifier/AttrDef/CSS/MultipleTest.php';