Changeset 653242c in github


Ignore:
Timestamp:
Apr 20, 2008 6:49:15 PM (5 years ago)
Author:
svncommit <devs@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
f025740
Parents:
ea090ca
Message:

Fix parse_attrib_string to handle unquoted attribute values

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rea090ca r653242c  
    11CHANGELOG RoundCube Webmail 
    22--------------------------- 
     3 
     42008/04/20 (estadtherr) 
     5---------- 
     6- fix parse_attrib_string to handle unquoted values, which fixes 
     7  display issues with HTML messages that do not quote attributes 
    38 
    492008/04/17 (alec) 
  • program/include/main.inc

    rea090ca r653242c  
    379379  { 
    380380  global $CONFIG; 
    381    
     381 
    382382  // return table name if configured 
    383383  $config_key = 'db_table_'.$table; 
     
    385385  if (strlen($CONFIG[$config_key])) 
    386386    return $CONFIG[$config_key]; 
    387    
     387 
    388388  return $table; 
    389389  } 
     
    392392/** 
    393393 * Return correct name for a specific database sequence 
    394  * (used for Postres only) 
     394 * (used for Postgres only) 
    395395 * 
    396396 * @param string Secuence name 
     
    400400  { 
    401401  global $CONFIG; 
    402    
     402 
    403403  // return table name if configured 
    404404  $config_key = 'db_sequence_'.$sequence; 
     
    406406  if (strlen($CONFIG[$config_key])) 
    407407    return $CONFIG[$config_key]; 
    408    
     408 
    409409  return $sequence; 
    410410  } 
     
    14841484  { 
    14851485  $attrib = array(); 
    1486   preg_match_all('/\s*([-_a-z]+)=(["\'])([^"]+)\2/Ui', stripslashes($str), $regs, PREG_SET_ORDER); 
     1486  preg_match_all('/\s*([-_a-z]+)=(["\'])??(?(2)([^"\']+)\2|(\S+?))/Ui', stripslashes($str), $regs, PREG_SET_ORDER); 
    14871487 
    14881488  // convert attributes to an associative array (name => value) 
    14891489  if ($regs) 
    14901490    foreach ($regs as $attr) 
    1491       $attrib[strtolower($attr[1])] = $attr[3]; 
     1491      { 
     1492      $attrib[strtolower($attr[1])] = $attr[3] . $attr[4]; 
     1493      } 
    14921494 
    14931495  return $attrib; 
     
    16341636 * Date will be added automatically to the line. 
    16351637 * 
    1636  * @param $name Name of logfile 
    1637  * @param $line Line to append 
     1638 * @param $name name of log file 
     1639 * @param line Line to append 
    16381640 */ 
    16391641function write_log($name, $line) 
Note: See TracChangeset for help on using the changeset viewer.