| | |
| | | |
| | | /* Block elements which could be empty but cannot be returned in short form (<tag />) */ |
| | | static $block_elements = array('div', 'p', 'pre', 'blockquote', 'a', 'font', 'center', |
| | | 'table', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'dl', 'strong', 'i', 'b'); |
| | | 'table', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'dl', 'strong', 'i', 'b', 'u'); |
| | | |
| | | /* State for linked objects in HTML */ |
| | | public $extlinks = false; |
| | |
| | | || ($src = $this->config['cid_map'][$this->config['base_url'].$match[2]])) { |
| | | $value .= ' url('.htmlspecialchars($src, ENT_QUOTES) . ')'; |
| | | } |
| | | else if (preg_match('/^(http|https|ftp):.*$/i', $match[2], $url)) { |
| | | else if (preg_match('!^(https?:)?//[a-z0-9/._+-]+$!i', $match[2], $url)) { |
| | | if ($this->config['allow_remote']) |
| | | $value .= ' url('.htmlspecialchars($url[0], ENT_QUOTES).')'; |
| | | else |
| | |
| | | case XML_ELEMENT_NODE: //Check element |
| | | $tagName = strtolower($node->tagName); |
| | | if ($callback = $this->handlers[$tagName]) { |
| | | $dump .= call_user_func($callback, $tagName, $this->wash_attribs($node), $this->dumpHtml($node)); |
| | | $dump .= call_user_func($callback, $tagName, $this->wash_attribs($node), $this->dumpHtml($node), $this); |
| | | } |
| | | else if (isset($this->_html_elements[$tagName])) { |
| | | $content = $this->dumpHtml($node); |
| | |
| | | return $this->dumpHtml($node); |
| | | } |
| | | |
| | | /** |
| | | * Getter for config parameters |
| | | */ |
| | | public function get_config($prop) |
| | | { |
| | | return $this->config[$prop]; |
| | | } |
| | | |
| | | } |
| | | |
| | | ?> |