4
* XHTML 1.1 Ruby Annotation Module, defines elements that indicate
5
* short runs of text alongside base text for annotation or pronounciation.
7
class HTMLPurifier_HTMLModule_Ruby extends HTMLPurifier_HTMLModule
10
public $name = 'Ruby';
12
public function setup($config) {
13
$this->addElement('ruby', 'Inline',
14
'Custom: ((rb, (rt | (rp, rt, rp))) | (rbc, rtc, rtc?))',
16
$this->addElement('rbc', false, 'Required: rb', 'Common');
17
$this->addElement('rtc', false, 'Required: rt', 'Common');
18
$rb = $this->addElement('rb', false, 'Inline', 'Common');
19
$rb->excludes = array('ruby' => true);
20
$rt = $this->addElement('rt', false, 'Inline', 'Common', array('rbspan' => 'Number'));
21
$rt->excludes = array('ruby' => true);
22
$this->addElement('rp', false, 'Optional: #PCDATA', 'Common');
4
* XHTML 1.1 Ruby Annotation Module, defines elements that indicate
5
* short runs of text alongside base text for annotation or pronounciation.
7
class HTMLPurifier_HTMLModule_Ruby extends HTMLPurifier_HTMLModule
13
public $name = 'Ruby';
16
* @param HTMLPurifier_Config $config
18
public function setup($config)
23
'Custom: ((rb, (rt | (rp, rt, rp))) | (rbc, rtc, rtc?))',
26
$this->addElement('rbc', false, 'Required: rb', 'Common');
27
$this->addElement('rtc', false, 'Required: rt', 'Common');
28
$rb = $this->addElement('rb', false, 'Inline', 'Common');
29
$rb->excludes = array('ruby' => true);
30
$rt = $this->addElement('rt', false, 'Inline', 'Common', array('rbspan' => 'Number'));
31
$rt->excludes = array('ruby' => true);
32
$this->addElement('rp', false, 'Optional: #PCDATA', 'Common');