"Fossies" - the Fresh Open Source Software Archive

Member "htmlpurifier-4.6.0/docs/dev-config-naming.txt" (30 Nov 2013, 4977 Bytes) of archive /linux/www/htmlpurifier-4.6.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

Configuration naming

HTML Purifier 4.0.0 features a new configuration naming system that allows arbitrary nesting of namespaces. While there are certain cases in which using two namespaces is obviously better (the canonical example is where we were using AutoFormatParam to contain directives for AutoFormat parameters), it is unclear whether or not a general migration to highly namespaced directives is a good idea or not.

== Case studies ==

=== Attr.* ===

We have a dead duck HTML.Attr.Name.UseCDATA which migrated before we decided to think this out thoroughly.

We currently have a large number of directives in the Attr.* namespace. These directives tweak the behavior of some HTML attributes. They have the properties:

== AutoFormat.* ==

These have the fairly normal pluggable architecture that lends itself to large amounts of namespaces (pluggability may be the key to figuring out when gratuitous namespacing is good.) Properties:

The AutoFormat string is a bit long, but is the only bit of repeated context.

== Core.* ==

Core is the potpourri of directives, mostly regarding some minor behavioral tweaks for HTML handling abilities.

AggressivelyFixLt
ConvertDocumentToFragment
DirectLexLineNumberSyncInterval
LexerImpl
MaintainLineNumbers
    Lexer
CollectErrors
Language
    Error handling (Language is ostensibly a little more general, but
    it's only used for error handling right now)
ColorKeywords
    CSS and HTML
Encoding
EscapeNonASCIICharacters
    Character encoding
EscapeInvalidChildren
EscapeInvalidTags
HiddenElements
RemoveInvalidImg
    Lexing/Output
RemoveScriptContents
    Deprecated

== HTML.* ==

AllowedAttributes
AllowedElements
AllowedModules
Allowed
ForbiddenAttributes
ForbiddenElements
    Element set tuning
BlockWrapper
    Child def advanced twiddle
CoreModules
CustomDoctype
    Advanced HTMLModuleManager twiddles
DefinitionID
DefinitionRev
    Caching
Doctype
Parent
Strict
XHTML
    Global environment
MaxImgLength
    Attribute twiddle? (applies to two attributes)
Proprietary
SafeEmbed
SafeObject
Trusted
    Extra functionality/tagsets
TidyAdd
TidyLevel
TidyRemove
    Tidy

== Output.* ==

These directly affect the output of Generator. These are all advanced twiddles.

== URI.* ==

AllowedSchemes
OverrideAllowedSchemes
    Scheme tuning
Base
DefaultScheme
Host
    Global environment
DefinitionID
DefinitionRev
    Caching
DisableExternalResources
DisableExternal
DisableResources
Disable
    Contextual/authority tuning
HostBlacklist
    Authority tuning
MakeAbsolute
MungeResources
MungeSecretKey
Munge
    Transformation behavior (munge can be grouped)