Changeset 5434 in subversion


Ignore:
Timestamp:
Nov 16, 2011 3:57:32 AM (19 months ago)
Author:
alec
Message:
  • Apply fixes from trunk up to r5433
Location:
branches/release-0.7
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/release-0.7/CHANGELOG

    r5426 r5434  
    22=========================== 
    33 
     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) 
    46- Fix listing of folders in hidden namespaces (#1486796) 
    57- Don't consider \Noselect flag when building folders tree (#1488004) 
  • branches/release-0.7/program/include/rcube_imap.php

    r5426 r5434  
    31693169        // return folders in all namespaces, we'll try to detect that situation 
    31703170        // and ask for these namespaces separately 
    3171         if ($root == '' && $name = '*') { 
     3171        if ($root == '' && $name == '*') { 
    31723172            $delim     = $this->get_hierarchy_delimiter(); 
    31733173            $namespace = $this->get_namespace(); 
  • branches/release-0.7/program/lib/washtml.php

    r4771 r5434  
    8282{ 
    8383  /* 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 
    8695  /* Ignore these HTML tags and their content */ 
    8796  static $ignore_elements = array('script', 'applet', 'embed', 'object', 'style'); 
    88    
     97 
    8998  /* 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  ); 
    91108 
    92109  /* 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 
    95113  /* State for linked objects in HTML */ 
    96114  public $extlinks = false; 
     
    101119  /* Registered callback functions for tags */ 
    102120  private $handlers = array(); 
    103    
     121 
    104122  /* Allowed HTML elements */ 
    105123  private $_html_elements = array(); 
     
    113131  /* Allowed HTML attributes */ 
    114132  private $_html_attribs = array(); 
    115    
     133 
    116134 
    117135  /* Constructor */ 
     
    124142    $this->config = $p + array('show_washed'=>true, 'allow_remote'=>false, 'cid_map'=>array()); 
    125143  } 
    126    
     144 
    127145  /* Register a callback function for a certain tag */ 
    128146  public function add_callback($tagName, $callback) 
     
    130148    $this->handlers[$tagName] = $callback; 
    131149  } 
    132    
     150 
    133151  /* Check CSS style */ 
    134152  private function wash_style($style) { 
     
    144162                 '|rgb\(\s*[0-9]+\s*,\s*[0-9]+\s*,\s*[0-9]+\s*\)'. 
    145163                 '|-?[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", -]+'. 
    147165                 ')\s*/i', $str, $match)) { 
    148166          if ($match[2]) { 
     
    161179            } 
    162180          } 
    163           else if ($match[0] != 'url' && $match[0] != 'rbg') //whitelist ? 
     181          else if ($match[0] != 'url' && $match[0] != 'rgb') //whitelist ? 
    164182            $value .= ' ' . $match[0]; 
     183 
    165184          $str = substr($str, strlen($match[0])); 
    166185        } 
     
    183202         ($key == 'href' && preg_match('/^(http:|https:|ftp:|mailto:|#).+/i', $value))) 
    184203        $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      } 
    187208      else if ($key == 'background' || ($key == 'src' && strtolower($node->tagName) == 'img')) { //check tagName anyway 
    188209        if (($src = $this->config['cid_map'][$value]) 
  • branches/release-0.7/program/steps/mail/compose.inc

    r5404 r5434  
    359359      $mailreplyto  = $MESSAGE->headers->others['mail-reply-to']; 
    360360 
     361      // Reply to mailing list... 
    361362      if ($MESSAGE->reply_all == 'list' && $mailfollowup) 
    362363        $fvalue = $mailfollowup; 
     
    364365        && preg_match('/<mailto:([^>]+)>/i', $MESSAGE->headers->others['list-post'], $m)) 
    365366        $fvalue = $m[1]; 
     367      // Reply to... 
    366368      else if ($MESSAGE->reply_all && $mailfollowup) 
    367369        $fvalue = $mailfollowup; 
     
    372374      else if (!empty($MESSAGE->headers->from)) 
    373375        $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      } 
    374381    } 
    375382    // add recipient of original message if reply to all 
  • branches/release-0.7/skins/default/common.css

    r5415 r5434  
    33body 
    44{ 
     5  font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; 
    56  margin: 8px; 
    67  background-color: #F6F6F6; 
     
    1920} 
    2021 
    21 body, td, th, div, p, h3, select, input, textarea 
    22 { 
    23   font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; 
     22body, td, th, div, p, select, input, textarea 
     23{ 
    2424  font-size: 12px; 
    2525} 
  • branches/release-0.7/skins/default/editor_content.css

    r4274 r5434  
    11/* 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 */ 
    32 
    43body, td, pre { 
     
    2625blockquote 
    2726{ 
    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%; 
    3231} 
  • branches/release-0.7/skins/default/mail.css

    r5415 r5434  
    436436  padding-bottom: 2px; 
    437437  text-decoration: none; 
     438  height: 15px; 
    438439} 
    439440 
  • branches/release-0.7/skins/default/print.css

    r3989 r5434  
    33body 
    44{ 
     5  font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; 
    56  background-color: #ffffff; 
    67  color: #000000; 
     
    89} 
    910 
    10 body, td, th, span, div, p, h3 
     11body, td, th, span, div, p 
    1112{ 
    12   font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; 
    1313  font-size: 9pt; 
    1414  color: #000000; 
Note: See TracChangeset for help on using the changeset viewer.