1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-05 05:37:49 +02:00

Set up configuration class, implement attr_id_blacklist

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@155 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-08-04 01:47:48 +00:00
parent 66f6cdcf3f
commit a0ee772423
9 changed files with 95 additions and 22 deletions

View File

@@ -0,0 +1,36 @@
<?php
// subclass this to add custom settings
class HTMLPurifier_Config
{
// which ids do we not allow?
var $attr_id_blacklist = array();
//////////////////////////////////////////////////////////////////////////
// all below properties have not been implemented yet
// prefix all ids with this
var $attr_id_prefix = '';
// if there's a prefix, we may want to transparently rewrite the
// URLs we parse too. However, we can only do it when it's a pure
// anchor link, so it's not foolproof
var $attr_id_rewrite_urls = false;
// determines how the classes array should be construed:
// blacklist - allow allow except those in $classes_blacklist
// whitelist - only allow those in $classes_whitelist
// when one is chosen, the other has no effect
var $attr_class_mode = 'blacklist';
var $attr_class_blacklist = array();
var $attr_class_whitelist = array();
function createDefault() {
$config = new HTMLPurifier_Config();
return $config;
}
}
?>