| | |
| | | static $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'); |
| | | |
| | | /* Block elements which could be empty but cannot be returned in short form (<tag />) */ |
| | | static $block_elements = array('div', 'p', 'pre', 'blockquote'); |
| | | static $block_elements = array('div', 'p', 'pre', 'blockquote', 'a', 'font'); |
| | | |
| | | /* State for linked objects in HTML */ |
| | | public $extlinks = false; |
| | |
| | | $key = strtolower($key); |
| | | $value = $node->getAttribute($key); |
| | | if(isset($this->_html_attribs[$key]) || |
| | | ($key == 'href' && preg_match('/^(http|https|ftp|mailto):.+/i', $value))) |
| | | ($key == 'href' && preg_match('/^(http:|https:|ftp:|mailto:|#).+/i', $value))) |
| | | $t .= ' ' . $key . '="' . htmlspecialchars($value, ENT_QUOTES) . '"'; |
| | | else if($key == 'style' && ($style = $this->wash_style($value))) |
| | | $t .= ' style="' . $style . '"'; |