Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / lib / htmlpurifier / HTMLPurifier / HTMLModule / Ruby.php
blobf54324468ddc019db574e01ac14c955a7bdfbbf3
1 <?php
3 require_once 'HTMLPurifier/HTMLModule.php';
5 /**
6 * XHTML 1.1 Ruby Annotation Module, defines elements that indicate
7 * short runs of text alongside base text for annotation or pronounciation.
8 */
9 class HTMLPurifier_HTMLModule_Ruby extends HTMLPurifier_HTMLModule
12 var $name = 'Ruby';
14 function HTMLPurifier_HTMLModule_Ruby() {
15 $this->addElement('ruby', true, 'Inline',
16 'Custom: ((rb, (rt | (rp, rt, rp))) | (rbc, rtc, rtc?))',
17 'Common');
18 $this->addElement('rbc', true, false, 'Required: rb', 'Common');
19 $this->addElement('rtc', true, false, 'Required: rt', 'Common');
20 $rb =& $this->addElement('rb', true, false, 'Inline', 'Common');
21 $rb->excludes = array('ruby' => true);
22 $rt =& $this->addElement('rt', true, false, 'Inline', 'Common', array('rbspan' => 'Number'));
23 $rt->excludes = array('ruby' => true);
24 $this->addElement('rp', true, false, 'Optional: #PCDATA', 'Common');