@@ -7,26 +7,26 @@ |
||
| 7 | 7 | class HTMLPurifier_HTMLModule_Proprietary extends HTMLPurifier_HTMLModule |
| 8 | 8 | { |
| 9 | 9 | |
| 10 | - public $name = 'Proprietary'; |
|
| 10 | + public $name = 'Proprietary'; |
|
| 11 | 11 | |
| 12 | - public function setup($config) { |
|
| 12 | + public function setup($config) { |
|
| 13 | 13 | |
| 14 | - $this->addElement('marquee', 'Inline', 'Flow', 'Common', |
|
| 15 | - array( |
|
| 16 | - 'direction' => 'Enum#left,right,up,down', |
|
| 17 | - 'behavior' => 'Enum#alternate', |
|
| 18 | - 'width' => 'Length', |
|
| 19 | - 'height' => 'Length', |
|
| 20 | - 'scrolldelay' => 'Number', |
|
| 21 | - 'scrollamount' => 'Number', |
|
| 22 | - 'loop' => 'Number', |
|
| 23 | - 'bgcolor' => 'Color', |
|
| 24 | - 'hspace' => 'Pixels', |
|
| 25 | - 'vspace' => 'Pixels', |
|
| 26 | - ) |
|
| 27 | - ); |
|
| 14 | + $this->addElement('marquee', 'Inline', 'Flow', 'Common', |
|
| 15 | + array( |
|
| 16 | + 'direction' => 'Enum#left,right,up,down', |
|
| 17 | + 'behavior' => 'Enum#alternate', |
|
| 18 | + 'width' => 'Length', |
|
| 19 | + 'height' => 'Length', |
|
| 20 | + 'scrolldelay' => 'Number', |
|
| 21 | + 'scrollamount' => 'Number', |
|
| 22 | + 'loop' => 'Number', |
|
| 23 | + 'bgcolor' => 'Color', |
|
| 24 | + 'hspace' => 'Pixels', |
|
| 25 | + 'vspace' => 'Pixels', |
|
| 26 | + ) |
|
| 27 | + ); |
|
| 28 | 28 | |
| 29 | - } |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | 31 | } |
| 32 | 32 | |
@@ -7,20 +7,20 @@ |
||
| 7 | 7 | class HTMLPurifier_HTMLModule_Ruby extends HTMLPurifier_HTMLModule |
| 8 | 8 | { |
| 9 | 9 | |
| 10 | - public $name = 'Ruby'; |
|
| 10 | + public $name = 'Ruby'; |
|
| 11 | 11 | |
| 12 | - public function setup($config) { |
|
| 13 | - $this->addElement('ruby', 'Inline', |
|
| 14 | - 'Custom: ((rb, (rt | (rp, rt, rp))) | (rbc, rtc, rtc?))', |
|
| 15 | - 'Common'); |
|
| 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'); |
|
| 23 | - } |
|
| 12 | + public function setup($config) { |
|
| 13 | + $this->addElement('ruby', 'Inline', |
|
| 14 | + 'Custom: ((rb, (rt | (rp, rt, rp))) | (rbc, rtc, rtc?))', |
|
| 15 | + 'Common'); |
|
| 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'); |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | 25 | } |
| 26 | 26 | |
@@ -6,28 +6,28 @@ |
||
| 6 | 6 | class HTMLPurifier_HTMLModule_SafeEmbed extends HTMLPurifier_HTMLModule |
| 7 | 7 | { |
| 8 | 8 | |
| 9 | - public $name = 'SafeEmbed'; |
|
| 9 | + public $name = 'SafeEmbed'; |
|
| 10 | 10 | |
| 11 | - public function setup($config) { |
|
| 11 | + public function setup($config) { |
|
| 12 | 12 | |
| 13 | - $max = $config->get('HTML.MaxImgLength'); |
|
| 14 | - $embed = $this->addElement( |
|
| 15 | - 'embed', 'Inline', 'Empty', 'Common', |
|
| 16 | - array( |
|
| 17 | - 'src*' => 'URI#embedded', |
|
| 18 | - 'type' => 'Enum#application/x-shockwave-flash', |
|
| 19 | - 'width' => 'Pixels#' . $max, |
|
| 20 | - 'height' => 'Pixels#' . $max, |
|
| 21 | - 'allowscriptaccess' => 'Enum#never', |
|
| 22 | - 'allownetworking' => 'Enum#internal', |
|
| 23 | - 'flashvars' => 'Text', |
|
| 24 | - 'wmode' => 'Enum#window,transparent,opaque', |
|
| 25 | - 'name' => 'ID', |
|
| 26 | - ) |
|
| 27 | - ); |
|
| 28 | - $embed->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeEmbed(); |
|
| 13 | + $max = $config->get('HTML.MaxImgLength'); |
|
| 14 | + $embed = $this->addElement( |
|
| 15 | + 'embed', 'Inline', 'Empty', 'Common', |
|
| 16 | + array( |
|
| 17 | + 'src*' => 'URI#embedded', |
|
| 18 | + 'type' => 'Enum#application/x-shockwave-flash', |
|
| 19 | + 'width' => 'Pixels#' . $max, |
|
| 20 | + 'height' => 'Pixels#' . $max, |
|
| 21 | + 'allowscriptaccess' => 'Enum#never', |
|
| 22 | + 'allownetworking' => 'Enum#internal', |
|
| 23 | + 'flashvars' => 'Text', |
|
| 24 | + 'wmode' => 'Enum#window,transparent,opaque', |
|
| 25 | + 'name' => 'ID', |
|
| 26 | + ) |
|
| 27 | + ); |
|
| 28 | + $embed->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeEmbed(); |
|
| 29 | 29 | |
| 30 | - } |
|
| 30 | + } |
|
| 31 | 31 | |
| 32 | 32 | } |
| 33 | 33 | |
@@ -16,8 +16,8 @@ |
||
| 16 | 16 | array( |
| 17 | 17 | 'src*' => 'URI#embedded', |
| 18 | 18 | 'type' => 'Enum#application/x-shockwave-flash', |
| 19 | - 'width' => 'Pixels#' . $max, |
|
| 20 | - 'height' => 'Pixels#' . $max, |
|
| 19 | + 'width' => 'Pixels#'.$max, |
|
| 20 | + 'height' => 'Pixels#'.$max, |
|
| 21 | 21 | 'allowscriptaccess' => 'Enum#never', |
| 22 | 22 | 'allownetworking' => 'Enum#internal', |
| 23 | 23 | 'flashvars' => 'Text', |
@@ -9,43 +9,43 @@ |
||
| 9 | 9 | class HTMLPurifier_HTMLModule_SafeObject extends HTMLPurifier_HTMLModule |
| 10 | 10 | { |
| 11 | 11 | |
| 12 | - public $name = 'SafeObject'; |
|
| 13 | - |
|
| 14 | - public function setup($config) { |
|
| 15 | - |
|
| 16 | - // These definitions are not intrinsically safe: the attribute transforms |
|
| 17 | - // are a vital part of ensuring safety. |
|
| 18 | - |
|
| 19 | - $max = $config->get('HTML.MaxImgLength'); |
|
| 20 | - $object = $this->addElement( |
|
| 21 | - 'object', |
|
| 22 | - 'Inline', |
|
| 23 | - 'Optional: param | Flow | #PCDATA', |
|
| 24 | - 'Common', |
|
| 25 | - array( |
|
| 26 | - // While technically not required by the spec, we're forcing |
|
| 27 | - // it to this value. |
|
| 28 | - 'type' => 'Enum#application/x-shockwave-flash', |
|
| 29 | - 'width' => 'Pixels#' . $max, |
|
| 30 | - 'height' => 'Pixels#' . $max, |
|
| 31 | - 'data' => 'URI#embedded', |
|
| 32 | - 'codebase' => new HTMLPurifier_AttrDef_Enum(array( |
|
| 33 | - 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0')), |
|
| 34 | - ) |
|
| 35 | - ); |
|
| 36 | - $object->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeObject(); |
|
| 37 | - |
|
| 38 | - $param = $this->addElement('param', false, 'Empty', false, |
|
| 39 | - array( |
|
| 40 | - 'id' => 'ID', |
|
| 41 | - 'name*' => 'Text', |
|
| 42 | - 'value' => 'Text' |
|
| 43 | - ) |
|
| 44 | - ); |
|
| 45 | - $param->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeParam(); |
|
| 46 | - $this->info_injector[] = 'SafeObject'; |
|
| 47 | - |
|
| 48 | - } |
|
| 12 | + public $name = 'SafeObject'; |
|
| 13 | + |
|
| 14 | + public function setup($config) { |
|
| 15 | + |
|
| 16 | + // These definitions are not intrinsically safe: the attribute transforms |
|
| 17 | + // are a vital part of ensuring safety. |
|
| 18 | + |
|
| 19 | + $max = $config->get('HTML.MaxImgLength'); |
|
| 20 | + $object = $this->addElement( |
|
| 21 | + 'object', |
|
| 22 | + 'Inline', |
|
| 23 | + 'Optional: param | Flow | #PCDATA', |
|
| 24 | + 'Common', |
|
| 25 | + array( |
|
| 26 | + // While technically not required by the spec, we're forcing |
|
| 27 | + // it to this value. |
|
| 28 | + 'type' => 'Enum#application/x-shockwave-flash', |
|
| 29 | + 'width' => 'Pixels#' . $max, |
|
| 30 | + 'height' => 'Pixels#' . $max, |
|
| 31 | + 'data' => 'URI#embedded', |
|
| 32 | + 'codebase' => new HTMLPurifier_AttrDef_Enum(array( |
|
| 33 | + 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0')), |
|
| 34 | + ) |
|
| 35 | + ); |
|
| 36 | + $object->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeObject(); |
|
| 37 | + |
|
| 38 | + $param = $this->addElement('param', false, 'Empty', false, |
|
| 39 | + array( |
|
| 40 | + 'id' => 'ID', |
|
| 41 | + 'name*' => 'Text', |
|
| 42 | + 'value' => 'Text' |
|
| 43 | + ) |
|
| 44 | + ); |
|
| 45 | + $param->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeParam(); |
|
| 46 | + $this->info_injector[] = 'SafeObject'; |
|
| 47 | + |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | 50 | } |
| 51 | 51 | |
@@ -26,8 +26,8 @@ |
||
| 26 | 26 | // While technically not required by the spec, we're forcing |
| 27 | 27 | // it to this value. |
| 28 | 28 | 'type' => 'Enum#application/x-shockwave-flash', |
| 29 | - 'width' => 'Pixels#' . $max, |
|
| 30 | - 'height' => 'Pixels#' . $max, |
|
| 29 | + 'width' => 'Pixels#'.$max, |
|
| 30 | + 'height' => 'Pixels#'.$max, |
|
| 31 | 31 | 'data' => 'URI#embedded', |
| 32 | 32 | 'codebase' => new HTMLPurifier_AttrDef_Enum(array( |
| 33 | 33 | 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0')), |
@@ -15,40 +15,40 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class HTMLPurifier_HTMLModule_Scripting extends HTMLPurifier_HTMLModule |
| 17 | 17 | { |
| 18 | - public $name = 'Scripting'; |
|
| 19 | - public $elements = array('script', 'noscript'); |
|
| 20 | - public $content_sets = array('Block' => 'script | noscript', 'Inline' => 'script | noscript'); |
|
| 21 | - public $safe = false; |
|
| 22 | - |
|
| 23 | - public function setup($config) { |
|
| 24 | - // TODO: create custom child-definition for noscript that |
|
| 25 | - // auto-wraps stray #PCDATA in a similar manner to |
|
| 26 | - // blockquote's custom definition (we would use it but |
|
| 27 | - // blockquote's contents are optional while noscript's contents |
|
| 28 | - // are required) |
|
| 29 | - |
|
| 30 | - // TODO: convert this to new syntax, main problem is getting |
|
| 31 | - // both content sets working |
|
| 32 | - |
|
| 33 | - // In theory, this could be safe, but I don't see any reason to |
|
| 34 | - // allow it. |
|
| 35 | - $this->info['noscript'] = new HTMLPurifier_ElementDef(); |
|
| 36 | - $this->info['noscript']->attr = array( 0 => array('Common') ); |
|
| 37 | - $this->info['noscript']->content_model = 'Heading | List | Block'; |
|
| 38 | - $this->info['noscript']->content_model_type = 'required'; |
|
| 39 | - |
|
| 40 | - $this->info['script'] = new HTMLPurifier_ElementDef(); |
|
| 41 | - $this->info['script']->attr = array( |
|
| 42 | - 'defer' => new HTMLPurifier_AttrDef_Enum(array('defer')), |
|
| 43 | - 'src' => new HTMLPurifier_AttrDef_URI(true), |
|
| 44 | - 'type' => new HTMLPurifier_AttrDef_Enum(array('text/javascript')) |
|
| 45 | - ); |
|
| 46 | - $this->info['script']->content_model = '#PCDATA'; |
|
| 47 | - $this->info['script']->content_model_type = 'optional'; |
|
| 48 | - $this->info['script']->attr_transform_pre['type'] = |
|
| 49 | - $this->info['script']->attr_transform_post['type'] = |
|
| 50 | - new HTMLPurifier_AttrTransform_ScriptRequired(); |
|
| 51 | - } |
|
| 18 | + public $name = 'Scripting'; |
|
| 19 | + public $elements = array('script', 'noscript'); |
|
| 20 | + public $content_sets = array('Block' => 'script | noscript', 'Inline' => 'script | noscript'); |
|
| 21 | + public $safe = false; |
|
| 22 | + |
|
| 23 | + public function setup($config) { |
|
| 24 | + // TODO: create custom child-definition for noscript that |
|
| 25 | + // auto-wraps stray #PCDATA in a similar manner to |
|
| 26 | + // blockquote's custom definition (we would use it but |
|
| 27 | + // blockquote's contents are optional while noscript's contents |
|
| 28 | + // are required) |
|
| 29 | + |
|
| 30 | + // TODO: convert this to new syntax, main problem is getting |
|
| 31 | + // both content sets working |
|
| 32 | + |
|
| 33 | + // In theory, this could be safe, but I don't see any reason to |
|
| 34 | + // allow it. |
|
| 35 | + $this->info['noscript'] = new HTMLPurifier_ElementDef(); |
|
| 36 | + $this->info['noscript']->attr = array( 0 => array('Common') ); |
|
| 37 | + $this->info['noscript']->content_model = 'Heading | List | Block'; |
|
| 38 | + $this->info['noscript']->content_model_type = 'required'; |
|
| 39 | + |
|
| 40 | + $this->info['script'] = new HTMLPurifier_ElementDef(); |
|
| 41 | + $this->info['script']->attr = array( |
|
| 42 | + 'defer' => new HTMLPurifier_AttrDef_Enum(array('defer')), |
|
| 43 | + 'src' => new HTMLPurifier_AttrDef_URI(true), |
|
| 44 | + 'type' => new HTMLPurifier_AttrDef_Enum(array('text/javascript')) |
|
| 45 | + ); |
|
| 46 | + $this->info['script']->content_model = '#PCDATA'; |
|
| 47 | + $this->info['script']->content_model_type = 'optional'; |
|
| 48 | + $this->info['script']->attr_transform_pre['type'] = |
|
| 49 | + $this->info['script']->attr_transform_post['type'] = |
|
| 50 | + new HTMLPurifier_AttrTransform_ScriptRequired(); |
|
| 51 | + } |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | // vim: et sw=4 sts=4 |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | // In theory, this could be safe, but I don't see any reason to |
| 34 | 34 | // allow it. |
| 35 | 35 | $this->info['noscript'] = new HTMLPurifier_ElementDef(); |
| 36 | - $this->info['noscript']->attr = array( 0 => array('Common') ); |
|
| 36 | + $this->info['noscript']->attr = array(0 => array('Common')); |
|
| 37 | 37 | $this->info['noscript']->content_model = 'Heading | List | Block'; |
| 38 | 38 | $this->info['noscript']->content_model_type = 'required'; |
| 39 | 39 | |
@@ -7,17 +7,17 @@ |
||
| 7 | 7 | class HTMLPurifier_HTMLModule_StyleAttribute extends HTMLPurifier_HTMLModule |
| 8 | 8 | { |
| 9 | 9 | |
| 10 | - public $name = 'StyleAttribute'; |
|
| 11 | - public $attr_collections = array( |
|
| 12 | - // The inclusion routine differs from the Abstract Modules but |
|
| 13 | - // is in line with the DTD and XML Schemas. |
|
| 14 | - 'Style' => array('style' => false), // see constructor |
|
| 15 | - 'Core' => array(0 => array('Style')) |
|
| 16 | - ); |
|
| 10 | + public $name = 'StyleAttribute'; |
|
| 11 | + public $attr_collections = array( |
|
| 12 | + // The inclusion routine differs from the Abstract Modules but |
|
| 13 | + // is in line with the DTD and XML Schemas. |
|
| 14 | + 'Style' => array('style' => false), // see constructor |
|
| 15 | + 'Core' => array(0 => array('Style')) |
|
| 16 | + ); |
|
| 17 | 17 | |
| 18 | - public function setup($config) { |
|
| 19 | - $this->attr_collections['Style']['style'] = new HTMLPurifier_AttrDef_CSS(); |
|
| 20 | - } |
|
| 18 | + public function setup($config) { |
|
| 19 | + $this->attr_collections['Style']['style'] = new HTMLPurifier_AttrDef_CSS(); |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | 22 | } |
| 23 | 23 | |
@@ -6,63 +6,63 @@ |
||
| 6 | 6 | class HTMLPurifier_HTMLModule_Tables extends HTMLPurifier_HTMLModule |
| 7 | 7 | { |
| 8 | 8 | |
| 9 | - public $name = 'Tables'; |
|
| 9 | + public $name = 'Tables'; |
|
| 10 | 10 | |
| 11 | - public function setup($config) { |
|
| 11 | + public function setup($config) { |
|
| 12 | 12 | |
| 13 | - $this->addElement('caption', false, 'Inline', 'Common'); |
|
| 13 | + $this->addElement('caption', false, 'Inline', 'Common'); |
|
| 14 | 14 | |
| 15 | - $this->addElement('table', 'Block', |
|
| 16 | - new HTMLPurifier_ChildDef_Table(), 'Common', |
|
| 17 | - array( |
|
| 18 | - 'border' => 'Pixels', |
|
| 19 | - 'cellpadding' => 'Length', |
|
| 20 | - 'cellspacing' => 'Length', |
|
| 21 | - 'frame' => 'Enum#void,above,below,hsides,lhs,rhs,vsides,box,border', |
|
| 22 | - 'rules' => 'Enum#none,groups,rows,cols,all', |
|
| 23 | - 'summary' => 'Text', |
|
| 24 | - 'width' => 'Length' |
|
| 25 | - ) |
|
| 26 | - ); |
|
| 15 | + $this->addElement('table', 'Block', |
|
| 16 | + new HTMLPurifier_ChildDef_Table(), 'Common', |
|
| 17 | + array( |
|
| 18 | + 'border' => 'Pixels', |
|
| 19 | + 'cellpadding' => 'Length', |
|
| 20 | + 'cellspacing' => 'Length', |
|
| 21 | + 'frame' => 'Enum#void,above,below,hsides,lhs,rhs,vsides,box,border', |
|
| 22 | + 'rules' => 'Enum#none,groups,rows,cols,all', |
|
| 23 | + 'summary' => 'Text', |
|
| 24 | + 'width' => 'Length' |
|
| 25 | + ) |
|
| 26 | + ); |
|
| 27 | 27 | |
| 28 | - // common attributes |
|
| 29 | - $cell_align = array( |
|
| 30 | - 'align' => 'Enum#left,center,right,justify,char', |
|
| 31 | - 'charoff' => 'Length', |
|
| 32 | - 'valign' => 'Enum#top,middle,bottom,baseline', |
|
| 33 | - ); |
|
| 28 | + // common attributes |
|
| 29 | + $cell_align = array( |
|
| 30 | + 'align' => 'Enum#left,center,right,justify,char', |
|
| 31 | + 'charoff' => 'Length', |
|
| 32 | + 'valign' => 'Enum#top,middle,bottom,baseline', |
|
| 33 | + ); |
|
| 34 | 34 | |
| 35 | - $cell_t = array_merge( |
|
| 36 | - array( |
|
| 37 | - 'abbr' => 'Text', |
|
| 38 | - 'colspan' => 'Number', |
|
| 39 | - 'rowspan' => 'Number', |
|
| 40 | - // Apparently, as of HTML5 this attribute only applies |
|
| 41 | - // to 'th' elements. |
|
| 42 | - 'scope' => 'Enum#row,col,rowgroup,colgroup', |
|
| 43 | - ), |
|
| 44 | - $cell_align |
|
| 45 | - ); |
|
| 46 | - $this->addElement('td', false, 'Flow', 'Common', $cell_t); |
|
| 47 | - $this->addElement('th', false, 'Flow', 'Common', $cell_t); |
|
| 35 | + $cell_t = array_merge( |
|
| 36 | + array( |
|
| 37 | + 'abbr' => 'Text', |
|
| 38 | + 'colspan' => 'Number', |
|
| 39 | + 'rowspan' => 'Number', |
|
| 40 | + // Apparently, as of HTML5 this attribute only applies |
|
| 41 | + // to 'th' elements. |
|
| 42 | + 'scope' => 'Enum#row,col,rowgroup,colgroup', |
|
| 43 | + ), |
|
| 44 | + $cell_align |
|
| 45 | + ); |
|
| 46 | + $this->addElement('td', false, 'Flow', 'Common', $cell_t); |
|
| 47 | + $this->addElement('th', false, 'Flow', 'Common', $cell_t); |
|
| 48 | 48 | |
| 49 | - $this->addElement('tr', false, 'Required: td | th', 'Common', $cell_align); |
|
| 49 | + $this->addElement('tr', false, 'Required: td | th', 'Common', $cell_align); |
|
| 50 | 50 | |
| 51 | - $cell_col = array_merge( |
|
| 52 | - array( |
|
| 53 | - 'span' => 'Number', |
|
| 54 | - 'width' => 'MultiLength', |
|
| 55 | - ), |
|
| 56 | - $cell_align |
|
| 57 | - ); |
|
| 58 | - $this->addElement('col', false, 'Empty', 'Common', $cell_col); |
|
| 59 | - $this->addElement('colgroup', false, 'Optional: col', 'Common', $cell_col); |
|
| 51 | + $cell_col = array_merge( |
|
| 52 | + array( |
|
| 53 | + 'span' => 'Number', |
|
| 54 | + 'width' => 'MultiLength', |
|
| 55 | + ), |
|
| 56 | + $cell_align |
|
| 57 | + ); |
|
| 58 | + $this->addElement('col', false, 'Empty', 'Common', $cell_col); |
|
| 59 | + $this->addElement('colgroup', false, 'Optional: col', 'Common', $cell_col); |
|
| 60 | 60 | |
| 61 | - $this->addElement('tbody', false, 'Required: tr', 'Common', $cell_align); |
|
| 62 | - $this->addElement('thead', false, 'Required: tr', 'Common', $cell_align); |
|
| 63 | - $this->addElement('tfoot', false, 'Required: tr', 'Common', $cell_align); |
|
| 61 | + $this->addElement('tbody', false, 'Required: tr', 'Common', $cell_align); |
|
| 62 | + $this->addElement('thead', false, 'Required: tr', 'Common', $cell_align); |
|
| 63 | + $this->addElement('tfoot', false, 'Required: tr', 'Common', $cell_align); |
|
| 64 | 64 | |
| 65 | - } |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | 67 | } |
| 68 | 68 | |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $this->addElement('caption', false, 'Inline', 'Common'); |
| 14 | 14 | |
| 15 | 15 | $this->addElement('table', 'Block', |
| 16 | - new HTMLPurifier_ChildDef_Table(), 'Common', |
|
| 16 | + new HTMLPurifier_ChildDef_Table(), 'Common', |
|
| 17 | 17 | array( |
| 18 | 18 | 'border' => 'Pixels', |
| 19 | 19 | 'cellpadding' => 'Length', |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | ), |
| 56 | 56 | $cell_align |
| 57 | 57 | ); |
| 58 | - $this->addElement('col', false, 'Empty', 'Common', $cell_col); |
|
| 58 | + $this->addElement('col', false, 'Empty', 'Common', $cell_col); |
|
| 59 | 59 | $this->addElement('colgroup', false, 'Optional: col', 'Common', $cell_col); |
| 60 | 60 | |
| 61 | 61 | $this->addElement('tbody', false, 'Required: tr', 'Common', $cell_align); |
@@ -6,17 +6,17 @@ |
||
| 6 | 6 | class HTMLPurifier_HTMLModule_Target extends HTMLPurifier_HTMLModule |
| 7 | 7 | { |
| 8 | 8 | |
| 9 | - public $name = 'Target'; |
|
| 9 | + public $name = 'Target'; |
|
| 10 | 10 | |
| 11 | - public function setup($config) { |
|
| 12 | - $elements = array('a'); |
|
| 13 | - foreach ($elements as $name) { |
|
| 14 | - $e = $this->addBlankElement($name); |
|
| 15 | - $e->attr = array( |
|
| 16 | - 'target' => new HTMLPurifier_AttrDef_HTML_FrameTarget() |
|
| 17 | - ); |
|
| 18 | - } |
|
| 19 | - } |
|
| 11 | + public function setup($config) { |
|
| 12 | + $elements = array('a'); |
|
| 13 | + foreach ($elements as $name) { |
|
| 14 | + $e = $this->addBlankElement($name); |
|
| 15 | + $e->attr = array( |
|
| 16 | + 'target' => new HTMLPurifier_AttrDef_HTML_FrameTarget() |
|
| 17 | + ); |
|
| 18 | + } |
|
| 19 | + } |
|
| 20 | 20 | |
| 21 | 21 | } |
| 22 | 22 | |
@@ -7,12 +7,12 @@ |
||
| 7 | 7 | class HTMLPurifier_HTMLModule_TargetBlank extends HTMLPurifier_HTMLModule |
| 8 | 8 | { |
| 9 | 9 | |
| 10 | - public $name = 'TargetBlank'; |
|
| 10 | + public $name = 'TargetBlank'; |
|
| 11 | 11 | |
| 12 | - public function setup($config) { |
|
| 13 | - $a = $this->addBlankElement('a'); |
|
| 14 | - $a->attr_transform_post[] = new HTMLPurifier_AttrTransform_TargetBlank(); |
|
| 15 | - } |
|
| 12 | + public function setup($config) { |
|
| 13 | + $a = $this->addBlankElement('a'); |
|
| 14 | + $a->attr_transform_post[] = new HTMLPurifier_AttrTransform_TargetBlank(); |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | 17 | } |
| 18 | 18 | |