0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-01-03 05:11:52 +00:00

Format config-ideas correctly.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@246 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2006-08-14 03:05:28 +00:00
parent 4bf0398984
commit d9d2fea769

View File

@ -2,70 +2,44 @@
Configuration Ideas Configuration Ideas
Here are some theoretical configuration ideas that we could implement some Here are some theoretical configuration ideas that we could implement some
time. time. Note the naming convention: %Namespace.Directive
%Attr.IDPrefix - prefix all ids with this %Attr.IDPrefix - prefix all ids with this
%Attr.RewriteFragments - if there's %Attr.IDPrefix we may want to transparently %Attr.RewriteFragments - if there's %Attr.IDPrefix we may want to transparently
rewrite the URLs we parse too. However, we can only do it when it's a pure rewrite the URLs we parse too. However, we can only do it when it's a pure
anchor link, so it's not foolproof anchor link, so it's not foolproof
// determines how the classes array should be construed: %Attr.ClassBlacklist,
// blacklist - allow allow except those in $classes_blacklist %Attr.ClassWhitelist,
// whitelist - only allow those in $classes_whitelist %Attr.ClassListMode - determines what classes are allowed. When
// when one is chosen, the other has no effect %Attr.ClassListMode is set to Blacklist, only allow those not in
%Attr.ClassBlacklist %Attr.ClassBlacklist. When it's Whitelist, only allow those in
%Attr.ClassWhitelist %Attr.ClassWhitelist.
%Attr.ClassListMode
// designate whether or not to allow numerals in language code subtags %Attr.LangAlphaOnly - designate whether or not to allow numerals in language
// RFC 1766, the current standard referenced by XML, does not permit code subtags
// numbers, but, * RFC 1766, the current standard referenced by XML, does not permit
// RFC 3066, the superseding best practice standard since January 2001, numbers, but,
// permits them. * RFC 3066, the superseding best practice standard since January 2001,
// we allow numbers by default, although you generally never see them permits them.
// at all. We allow numbers by default, but you generally never see them
%Attr.LangAlphaOnly at all, which makes this a little more sane.
// max amount of pixels allowed to be specified %Attr.MaxWidth,
var $attr_pixels_hmax = 600; // horizontal context %Attr.MaxHeight - caps for width and height related checks.
var $attr_pixels_vmax = 1200; // vertical context
// allowed URI schemes %URI.Munge - will munge all URIs to a different URI, which should redirect
var $uri_schemes = array( the user to the applicable page. A urlencoded version of the URI
// based off of MediaWiki's default settings will replace any instances of %s in the string. One possible
// the ones that definitely must be implemented (they're the same though) string is 'http://www.google.com/url?q=%s'. Useful for preventing
'http' => true, // "Hypertext Transfer Protocol", nuf' said pagerank from being sent to other sites
'https' => true, // HTTP over SSL (Secure Socket Layer)
// quite useful, but not necessary
'mailto' => true,// Email
'ftp' => true, // "File Transfer Protocol"
'irc' => true, // "Internet Relay Chat", usually needs another app
// obscure
'telnet' => true,// network protocol for non-secure remote terminal sessions
// for Usenet, these two are similar, but distinct
'nntp' => true, // individual Netnews articles
'news' => true // newsgroup or individual Netnews articles
// gopher and worldwind excluded
);
// will munge all URIs to a different URI, which should redirect %URI.AddRelNofollow - will add rel="nofollow" to all links, preventing the
// the user to the applicable page. A urlencoded version of the URI spread of ill-gotten pagerank
// will replace any instances of %s in the string. One possible
// string is 'http://www.google.com/url?q=%s'. Useful for preventing
// pagerank from being sent to other sites
var $uri_munge = false;
// will add rel="nofollow" to all links, also helps prevent pagerank %URI.Host - host of website, for external link checks
// from going around
var $uri_add_relnofollow = false;
// web root of the website, we'll try to auto-detect it. Something %URI.RelativeToAbsolute - transforms all relative URIs to absolute form
// like 'www.example.com/'???
var $uri_webroot = null;
// transform all relative URIs into their absolute forms, requires %URI.DisableExternal - disable external links
// $uri_webroot
var $uri_make_absolute = false;
// disables external links, requires $uri_webroot
var $uri_disable_external = false;