mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-10 15:48:42 +00:00
27 lines
703 B
PHP
27 lines
703 B
PHP
|
<?php
|
||
|
|
||
|
require_once 'HTMLPurifier/HTMLModule/Tidy.php';
|
||
|
|
||
|
class HTMLPurifier_HTMLModule_Tidy_Proprietary extends
|
||
|
HTMLPurifier_HTMLModule_Tidy
|
||
|
{
|
||
|
|
||
|
var $name = 'Tidy_Proprietary';
|
||
|
var $defaultLevel = 'light';
|
||
|
|
||
|
function makeFixes() {
|
||
|
$r = array();
|
||
|
|
||
|
// {{{ // duplicated from XHTMLAndHTML4: not sure how to factor out
|
||
|
$align_lookup = array();
|
||
|
$align_values = array('left', 'right', 'center', 'justify');
|
||
|
foreach ($align_values as $v) $align_lookup[$v] = "text-align:$v;";
|
||
|
// }}}
|
||
|
$r['div@align'] = new HTMLPurifier_AttrTransform_EnumToCSS('align', $align_lookup);
|
||
|
|
||
|
return $r;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
?>
|