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

[1.7.0] Refactor HTMLDefinition and CSSDefinition to have a common Definition parent, rename setup() to doSetup() and make setup() call the template method after setting the setup variable. Test for references in ConfigTest.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1091 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-24 21:50:43 +00:00
parent 7a3e06d4d0
commit a62f8971e4
5 changed files with 28 additions and 39 deletions

View File

@@ -1,5 +1,7 @@
<?php
require_once 'HTMLPurifier/Definition.php';
require_once 'HTMLPurifier/AttrDef/CSS/Background.php';
require_once 'HTMLPurifier/AttrDef/CSS/BackgroundPosition.php';
require_once 'HTMLPurifier/AttrDef/CSS/Border.php';
@@ -19,7 +21,7 @@ require_once 'HTMLPurifier/AttrDef/Enum.php';
* Defines allowed CSS attributes and what their values are.
* @see HTMLPurifier_HTMLDefinition
*/
class HTMLPurifier_CSSDefinition
class HTMLPurifier_CSSDefinition extends HTMLPurifier_Definition
{
/**
@@ -30,7 +32,7 @@ class HTMLPurifier_CSSDefinition
/**
* Constructs the info array. The meat of this class.
*/
function setup($config) {
function doSetup($config) {
$this->info['text-align'] = new HTMLPurifier_AttrDef_Enum(
array('left', 'right', 'center', 'justify'), false);