| | |
| | | /* |
| | | +-----------------------------------------------------------------------+ |
| | | | This file is part of the Roundcube Webmail client | |
| | | | Copyright (C) 2005-2011, The Roundcube Dev Team | |
| | | | Copyright (C) 2005-2013, The Roundcube Dev Team | |
| | | | | |
| | | | Licensed under the GNU General Public License version 3 or | |
| | | | any later version with exceptions for skins & plugins. | |
| | |
| | | |
| | | public static $doctype = 'xhtml'; |
| | | public static $lc_tags = true; |
| | | public static $common_attrib = array('id','class','style','title','align'); |
| | | public static $containers = array('iframe','div','span','p','h1','h2','h3','form','textarea','table','thead','tbody','tr','th','td','style','script'); |
| | | public static $common_attrib = array('id','class','style','title','align','unselectable'); |
| | | public static $containers = array('iframe','div','span','p','h1','h2','h3','ul','form','textarea','table','thead','tbody','tr','th','td','style','script'); |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | public function __construct($attrib = array()) |
| | | { |
| | | $default_attrib = self::$doctype == 'xhtml' ? array('summary' => '', 'border' => 0) : array(); |
| | | $this->attrib = array_merge($attrib, $default_attrib); |
| | | $default_attrib = self::$doctype == 'xhtml' ? array('summary' => '', 'border' => '0') : array(); |
| | | $this->attrib = array_merge($attrib, $default_attrib); |
| | | |
| | | if (!empty($attrib['tagname']) && $attrib['tagname'] != 'table') { |
| | | $this->tagname = $attrib['tagname']; |
| | |
| | | private function _row_tagname() |
| | | { |
| | | static $row_tagnames = array('table' => 'tr', 'ul' => 'li', '*' => 'div'); |
| | | return $row_tagnames[$this->tagname] ?: $row_tagnames['*']; |
| | | return $row_tagnames[$this->tagname] ? $row_tagnames[$this->tagname] : $row_tagnames['*']; |
| | | } |
| | | |
| | | /** |
| | |
| | | private function _col_tagname() |
| | | { |
| | | static $col_tagnames = array('table' => 'td', '*' => 'span'); |
| | | return $col_tagnames[$this->tagname] ?: $col_tagnames['*']; |
| | | return $col_tagnames[$this->tagname] ? $col_tagnames[$this->tagname] : $col_tagnames['*']; |
| | | } |
| | | |
| | | } |