root/afridex/plugins/Flutter/purifier_lib/HTMLPurifier/AttrTransform/BdoDir.php

Revision 21, 470 bytes (checked in by admin, 18 years ago)
Line 
1<?php
2
3// this MUST be placed in post, as it assumes that any value in dir is valid
4
5/**
6 * Post-trasnform that ensures that bdo tags have the dir attribute set.
7 */
8class HTMLPurifier_AttrTransform_BdoDir extends HTMLPurifier_AttrTransform
9{
10   
11    public function transform($attr, $config, $context) {
12        if (isset($attr['dir'])) return $attr;
13        $attr['dir'] = $config->get('Attr', 'DefaultTextDir');
14        return $attr;
15    }
16   
17}
18
Note: See TracBrowser for help on using the browser.