Class rcube_washtml

Description

Utility class providing HTML sanityzer

Located in /lib/Roundcube/rcube_washtml.php (line 88)


	
			
Direct descendents
Class Description
 class washtml Utility class providing HTML sanityzer
Variable Summary
 static mixed $block_elements
 static mixed $html_attribs
 static mixed $html_elements
 static mixed $ignore_elements
 mixed $extlinks
Method Summary
 static void html_tag_callback ( $matches)
 static void resolve_base ( $body)
 rcube_washtml __construct ([ $p = array()])
 void add_callback ( $tagName,  $callback)
 void get_config ( $prop)
 void wash ( $html)
Variables
static mixed $block_elements = array('div', 'p', 'pre', 'blockquote', 'a', 'font', 'center',
'table', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'dl', 'strong',
'i', 'b', 'u', 'span',
)
(line 117)
static mixed $html_attribs = array('name', 'class', 'title', 'alt', 'width', 'height',
'align', 'nowrap', 'col', 'row', 'id', 'rowspan', 'colspan', 'cellspacing',
'cellpadding', 'valign', 'bgcolor', 'color', 'border', 'bordercolorlight',
'bordercolordark', 'face', 'marginwidth', 'marginheight', 'axis', 'border',
'abbr', 'char', 'charoff', 'clear', 'compact', 'coords', 'vspace', 'hspace',
'cellborder', 'size', 'lang', 'dir', 'usemap', 'shape', 'media',
// attributes of form elements
'type', 'rows', 'cols', 'disabled', 'readonly', 'checked', 'multiple', 'value'
)
(line 106)
static mixed $html_elements = array('a', 'abbr', 'acronym', 'address', 'area', 'b',
'basefont', 'bdo', 'big', 'blockquote', 'br', 'caption', 'center',
'cite', 'code', 'col', 'colgroup', 'dd', 'del', 'dfn', 'dir', 'div', 'dl',
'dt', 'em', 'fieldset', 'font', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i',
'ins', 'label', 'legend', 'li', 'map', 'menu', 'nobr', 'ol', 'p', 'pre', 'q',
's', 'samp', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'table',
'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'u', 'ul', 'var', 'wbr', 'img',
// form elements
'button', 'input', 'textarea', 'select', 'option', 'optgroup'
)
(line 91)
static mixed $ignore_elements = array('script', 'applet', 'embed', 'object', 'style') (line 103)
mixed $extlinks = false (line 123)
  • access: public
Methods
static html_tag_callback (line 428)

Callback function for HTML tags fixing

  • access: public
void html_tag_callback ( $matches)
  • $matches
static resolve_base (line 442)

Convert all relative URLs according to a <base> in HTML

  • access: public
void resolve_base ( $body)
  • $body
Constructor __construct (line 147)

Class constructor

  • access: public
rcube_washtml __construct ([ $p = array()])
  • $p
add_callback (line 162)

Register a callback function for a certain tag

  • access: public
void add_callback ( $tagName,  $callback)
  • $tagName
  • $callback
get_config (line 368)

Getter for config parameters

  • access: public
void get_config ( $prop)
  • $prop
wash (line 345)

Main function, give it untrusted HTML, tell it if you allow loading remote images and give it a map to convert "cid:" urls.

  • access: public
void wash ( $html)
  • $html

Documentation generated on Fri, 03 May 2013 12:45:07 +0200 by phpDocumentor 1.4.4