mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-10 15:48:42 +00:00
f5b72c623c
- Destroy some zombie context variables - Reorganize some TODO items git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1347 48356398-32a2-884e-a903-53898d9a118a
29 lines
1002 B
PHP
29 lines
1002 B
PHP
<?php
|
|
|
|
require_once 'HTMLPurifier/HTMLModule.php';
|
|
|
|
/**
|
|
* XHTML 1.1 Ruby Annotation Module, defines elements that indicate
|
|
* short runs of text alongside base text for annotation or pronounciation.
|
|
*/
|
|
class HTMLPurifier_HTMLModule_Ruby extends HTMLPurifier_HTMLModule
|
|
{
|
|
|
|
var $name = 'Ruby';
|
|
|
|
function HTMLPurifier_HTMLModule_Ruby() {
|
|
$this->addElement('ruby', true, 'Inline',
|
|
'Custom: ((rb, (rt | (rp, rt, rp))) | (rbc, rtc, rtc?))',
|
|
'Common');
|
|
$this->addElement('rbc', true, false, 'Required: rb', 'Common');
|
|
$this->addElement('rtc', true, false, 'Required: rt', 'Common');
|
|
$rb =& $this->addElement('rb', true, false, 'Inline', 'Common');
|
|
$rb->excludes = array('ruby' => true);
|
|
$rt =& $this->addElement('rt', true, false, 'Inline', 'Common', array('rbspan' => 'Number'));
|
|
$rt->excludes = array('ruby' => true);
|
|
$this->addElement('rp', true, false, 'Optional: #PCDATA', 'Common');
|
|
}
|
|
|
|
}
|
|
|