Changeset 5434 in subversion
- Timestamp:
- Nov 16, 2011 3:57:32 AM (19 months ago)
- Location:
- branches/release-0.7
- Files:
-
- 8 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/rcube_imap.php (modified) (1 diff)
-
program/lib/washtml.php (modified) (8 diffs)
-
program/steps/mail/compose.inc (modified) (3 diffs)
-
skins/default/common.css (modified) (2 diffs)
-
skins/default/editor_content.css (modified) (2 diffs)
-
skins/default/mail.css (modified) (1 diff)
-
skins/default/print.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-0.7/CHANGELOG
r5426 r5434 2 2 =========================== 3 3 4 - Fix handling of HTML form elements in messages (#1485137) 5 - Fix regression in setting recipient to self when replying to a Sent message (#1487074) 4 6 - Fix listing of folders in hidden namespaces (#1486796) 5 7 - Don't consider \Noselect flag when building folders tree (#1488004) -
branches/release-0.7/program/include/rcube_imap.php
r5426 r5434 3169 3169 // return folders in all namespaces, we'll try to detect that situation 3170 3170 // and ask for these namespaces separately 3171 if ($root == '' && $name = '*') {3171 if ($root == '' && $name == '*') { 3172 3172 $delim = $this->get_hierarchy_delimiter(); 3173 3173 $namespace = $this->get_namespace(); -
branches/release-0.7/program/lib/washtml.php
r4771 r5434 82 82 { 83 83 /* Allowed HTML elements (default) */ 84 static $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'); 85 84 static $html_elements = array('a', 'abbr', 'acronym', 'address', 'area', 'b', 85 'basefont', 'bdo', 'big', 'blockquote', 'br', 'caption', 'center', 86 'cite', 'code', 'col', 'colgroup', 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 87 'dt', 'em', 'fieldset', 'font', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 88 'ins', 'label', 'legend', 'li', 'map', 'menu', 'nobr', 'ol', 'p', 'pre', 'q', 89 's', 'samp', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'table', 90 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'u', 'ul', 'var', 'wbr', 'img', 91 // form elements 92 'button', 'input', 'textarea', 'select', 'option', 'optgroup' 93 ); 94 86 95 /* Ignore these HTML tags and their content */ 87 96 static $ignore_elements = array('script', 'applet', 'embed', 'object', 'style'); 88 97 89 98 /* Allowed HTML attributes */ 90 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'); 99 static $html_attribs = array('name', 'class', 'title', 'alt', 'width', 'height', 100 'align', 'nowrap', 'col', 'row', 'id', 'rowspan', 'colspan', 'cellspacing', 101 'cellpadding', 'valign', 'bgcolor', 'color', 'border', 'bordercolorlight', 102 'bordercolordark', 'face', 'marginwidth', 'marginheight', 'axis', 'border', 103 'abbr', 'char', 'charoff', 'clear', 'compact', 'coords', 'vspace', 'hspace', 104 'cellborder', 'size', 'lang', 'dir', 105 // attributes of form elements 106 'type', 'rows', 'cols', 'disabled', 'readonly', 'checked', 'multiple', 'value' 107 ); 91 108 92 109 /* Block elements which could be empty but cannot be returned in short form (<tag />) */ 93 static $block_elements = array('div', 'p', 'pre', 'blockquote', 'a', 'font', 'center', 'table', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'dl', 'strong', 'i', 'b'); 94 110 static $block_elements = array('div', 'p', 'pre', 'blockquote', 'a', 'font', 'center', 111 'table', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'dl', 'strong', 'i', 'b'); 112 95 113 /* State for linked objects in HTML */ 96 114 public $extlinks = false; … … 101 119 /* Registered callback functions for tags */ 102 120 private $handlers = array(); 103 121 104 122 /* Allowed HTML elements */ 105 123 private $_html_elements = array(); … … 113 131 /* Allowed HTML attributes */ 114 132 private $_html_attribs = array(); 115 133 116 134 117 135 /* Constructor */ … … 124 142 $this->config = $p + array('show_washed'=>true, 'allow_remote'=>false, 'cid_map'=>array()); 125 143 } 126 144 127 145 /* Register a callback function for a certain tag */ 128 146 public function add_callback($tagName, $callback) … … 130 148 $this->handlers[$tagName] = $callback; 131 149 } 132 150 133 151 /* Check CSS style */ 134 152 private function wash_style($style) { … … 144 162 '|rgb\(\s*[0-9]+\s*,\s*[0-9]+\s*,\s*[0-9]+\s*\)'. 145 163 '|-?[0-9.]+\s*(em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)?'. 146 '|#[0-9a-f]{3,6}|[a-z0-9 \-]+'.164 '|#[0-9a-f]{3,6}|[a-z0-9", -]+'. 147 165 ')\s*/i', $str, $match)) { 148 166 if ($match[2]) { … … 161 179 } 162 180 } 163 else if ($match[0] != 'url' && $match[0] != 'r bg') //whitelist ?181 else if ($match[0] != 'url' && $match[0] != 'rgb') //whitelist ? 164 182 $value .= ' ' . $match[0]; 183 165 184 $str = substr($str, strlen($match[0])); 166 185 } … … 183 202 ($key == 'href' && preg_match('/^(http:|https:|ftp:|mailto:|#).+/i', $value))) 184 203 $t .= ' ' . $key . '="' . htmlspecialchars($value, ENT_QUOTES) . '"'; 185 else if ($key == 'style' && ($style = $this->wash_style($value))) 186 $t .= ' style="' . $style . '"'; 204 else if ($key == 'style' && ($style = $this->wash_style($value))) { 205 $quot = strpos($style, '"') !== false ? "'" : '"'; 206 $t .= ' style=' . $quot . $style . $quot; 207 } 187 208 else if ($key == 'background' || ($key == 'src' && strtolower($node->tagName) == 'img')) { //check tagName anyway 188 209 if (($src = $this->config['cid_map'][$value]) -
branches/release-0.7/program/steps/mail/compose.inc
r5404 r5434 359 359 $mailreplyto = $MESSAGE->headers->others['mail-reply-to']; 360 360 361 // Reply to mailing list... 361 362 if ($MESSAGE->reply_all == 'list' && $mailfollowup) 362 363 $fvalue = $mailfollowup; … … 364 365 && preg_match('/<mailto:([^>]+)>/i', $MESSAGE->headers->others['list-post'], $m)) 365 366 $fvalue = $m[1]; 367 // Reply to... 366 368 else if ($MESSAGE->reply_all && $mailfollowup) 367 369 $fvalue = $mailfollowup; … … 372 374 else if (!empty($MESSAGE->headers->from)) 373 375 $fvalue = $MESSAGE->headers->from; 376 377 // Reply to message sent by yourself (#1487074) 378 if (!empty($ident) && $fvalue == $ident['ident']) { 379 $fvalue = $MESSAGE->headers->to; 380 } 374 381 } 375 382 // add recipient of original message if reply to all -
branches/release-0.7/skins/default/common.css
r5415 r5434 3 3 body 4 4 { 5 font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; 5 6 margin: 8px; 6 7 background-color: #F6F6F6; … … 19 20 } 20 21 21 body, td, th, div, p, h3, select, input, textarea 22 { 23 font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; 22 body, td, th, div, p, select, input, textarea 23 { 24 24 font-size: 12px; 25 25 } -
branches/release-0.7/skins/default/editor_content.css
r4274 r5434 1 1 /* This file contains the CSS data for the editable area(iframe) of TinyMCE */ 2 /* You can extend this CSS by adding your own CSS file with the the content_css option */3 2 4 3 body, td, pre { … … 26 25 blockquote 27 26 { 28 padding-left: 5px;29 border-left: #1010ff 2px solid;30 margin-left: 5px;31 width: 100%;27 padding-left: 5px; 28 border-left: #1010ff 2px solid; 29 margin-left: 5px; 30 width: 100%; 32 31 } -
branches/release-0.7/skins/default/mail.css
r5415 r5434 436 436 padding-bottom: 2px; 437 437 text-decoration: none; 438 height: 15px; 438 439 } 439 440 -
branches/release-0.7/skins/default/print.css
r3989 r5434 3 3 body 4 4 { 5 font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; 5 6 background-color: #ffffff; 6 7 color: #000000; … … 8 9 } 9 10 10 body, td, th, span, div, p , h311 body, td, th, span, div, p 11 12 { 12 font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;13 13 font-size: 9pt; 14 14 color: #000000;
Note: See TracChangeset
for help on using the changeset viewer.
