Changeset 503e019 in github
- Timestamp:
- Jul 17, 2009 3:32:59 AM (4 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 77edef7
- Parents:
- 881217a
- Files:
-
- 2 edited
-
CHANGELOG (modified) (1 diff)
-
program/lib/washtml.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
r19862b55 r503e019 2 2 =========================== 3 3 4 - Fix HTML messages output with empty block elements (#1485974) 4 5 - Added hook when killing a session 5 6 - Added hook to write_log function (#1485971) -
program/lib/washtml.php
rf7fff8f r503e019 82 82 /* Allowed HTML attributes */ 83 83 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'); 84 85 /* Block elements which could be empty but cannot be returned in short form (<tag />) */ 86 static $block_elements = array('div', 'p', 'pre', 'blockquote'); 84 87 85 88 /* State for linked objects in HTML */ … … 97 100 /* Ignore these HTML tags but process their content */ 98 101 private $_ignore_elements = array(); 102 103 /* Block elements which could be empty but cannot be returned in short form (<tag />) */ 104 private $_block_elements = array(); 99 105 100 106 /* Allowed HTML attributes */ … … 107 113 $this->_html_attribs = array_flip((array)$p['html_attribs']) + array_flip(self::$html_attribs); 108 114 $this->_ignore_elements = array_flip((array)$p['ignore_elements']) + array_flip(self::$ignore_elements); 109 unset($p['html_elements'], $p['html_attribs'], $p['ignore_elements']); 115 $this->_block_elements = array_flip((array)$p['block_elements']) + array_flip(self::$block_elements); 116 unset($p['html_elements'], $p['html_attribs'], $p['ignore_elements'], $p['block_elements']); 110 117 $this->config = $p + array('show_washed'=>true, 'allow_remote'=>false, 'cid_map'=>array()); 111 118 } … … 203 210 $content = $this->dumpHtml($node); 204 211 $dump .= '<' . $tagName . $this->wash_attribs($node) . 205 ($content?">$content</$tagName>":' />'); 212 // ($content?">$content</$tagName>":' />'); 213 // Roundcube Trac: #1485974 214 ($content || isset($this->_block_elements[$tagName]) ? ">$content</$tagName>" : ' />'); 206 215 } else if(isset($this->_ignore_elements[$tagName])) { 207 216 $dump .= '<!-- ' . htmlspecialchars($tagName, ENT_QUOTES) . ' ignored -->';
Note: See TracChangeset
for help on using the changeset viewer.
