1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 06:07:26 +02:00

Implement center, menu and dir tag transformations. Font transform pending.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@140 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-08-02 02:24:03 +00:00
parent d243545142
commit 626cfc1172
6 changed files with 220 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ require_once 'HTMLPurifier/AttrDef.php';
require_once 'HTMLPurifier/ChildDef.php';
require_once 'HTMLPurifier/Generator.php';
require_once 'HTMLPurifier/Token.php';
require_once 'HTMLPurifier/TagTransform.php';
/**
* Defines the purified HTML type with large amounts of objects.
@@ -39,6 +40,9 @@ class HTMLPurifier_Definition
// used solely by HTMLPurifier_Strategy_FixNesting
var $info_parent = 'div';
// used solely by HTMLPurifier_Strategy_RemoveForeignElements
var $info_tag_transform = array();
function instance() {
static $instance = null;
if (!$instance) {
@@ -212,6 +216,11 @@ class HTMLPurifier_Definition
// dir -> ul
// center -> div / css: text-align: center;
//$this->info_tag_transform['font'] = new HTMLPurifier_TagTransform_Font();
$this->info_tag_transform['menu'] = new HTMLPurifier_TagTransform_Simple('ul');
$this->info_tag_transform['dir'] = new HTMLPurifier_TagTransform_Simple('ul');
$this->info_tag_transform['center'] = new HTMLPurifier_TagTransform_Center();
//////////////////////////////////////////////////////////////////////
// info[]->auto_close : tags that automatically close another