mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-14 01:08:41 +00:00
35f8b3c801
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1539 48356398-32a2-884e-a903-53898d9a118a
19 lines
452 B
PHP
19 lines
452 B
PHP
<?php
|
|
|
|
// this MUST be placed in post, as it assumes that any value in dir is valid
|
|
|
|
/**
|
|
* Post-trasnform that ensures that bdo tags have the dir attribute set.
|
|
*/
|
|
class HTMLPurifier_AttrTransform_BdoDir extends HTMLPurifier_AttrTransform
|
|
{
|
|
|
|
public function transform($attr, $config, $context) {
|
|
if (isset($attr['dir'])) return $attr;
|
|
$attr['dir'] = $config->get('Attr', 'DefaultTextDir');
|
|
return $attr;
|
|
}
|
|
|
|
}
|
|
|