2008-06-27 19:44:27 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Name is deprecated, but allowed in strict doctypes, so onl
|
|
|
|
*/
|
|
|
|
class HTMLPurifier_HTMLModule_Tidy_Name extends HTMLPurifier_HTMLModule_Tidy
|
|
|
|
{
|
|
|
|
public $name = 'Tidy_Name';
|
|
|
|
public $defaultLevel = 'heavy';
|
|
|
|
public function makeFixes() {
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2008-06-27 19:44:27 +00:00
|
|
|
$r = array();
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2008-06-27 19:44:27 +00:00
|
|
|
// @name for img, a -----------------------------------------------
|
|
|
|
// Technically, it's allowed even on strict, so we allow authors to use
|
|
|
|
// it. However, it's deprecated in future versions of XHTML.
|
2008-12-06 07:28:20 +00:00
|
|
|
$r['img@name'] =
|
2008-06-27 19:44:27 +00:00
|
|
|
$r['a@name'] = new HTMLPurifier_AttrTransform_Name();
|
2008-12-06 07:28:20 +00:00
|
|
|
|
2008-06-27 19:44:27 +00:00
|
|
|
return $r;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|