thomascube
2008-02-08 38b012e072f808393f87f5cc3059fab7072fb8b7
program/include/rcube_html.inc
@@ -292,23 +292,19 @@
      if ((strpos($key,'on')===0 && $value==''))
        continue;
      // encode textarea content
      if ($key=='value')
        $value = Q($value, 'strict', FALSE);
      // attributes with no value
      if (in_array($key, array('checked', 'multiple', 'disabled', 'selected')))
      if (in_array($key, array('checked', 'multiple', 'disabled', 'selected', 'nowrap')))
      {
        if ($value)
          $attrib_arr[] = $key;
          $attrib_arr[] = sprintf('%s="%s"', $this->_conv_case($key, 'attrib'), $key);
      }
      // don't convert size of value attribute
      else if ($key=='value')
        $attrib_arr[] = sprintf('%s="%s"', $this->_conv_case($key, 'attrib'), $value, 'value');
        $attrib_arr[] = sprintf('%s="%s"', $this->_conv_case($key, 'attrib'), Q($value, 'strict', false));
        
      // regular tag attributes
      else
        $attrib_arr[] = sprintf('%s="%s"', $this->_conv_case($key, 'attrib'), $this->_conv_case($value, 'value'));
        $attrib_arr[] = sprintf('%s="%s"', $this->_conv_case($key, 'attrib'), $this->_conv_case(Q($value), 'value'));
    }
    return sizeof($attrib_arr) ? ' '.implode(' ', $attrib_arr) : '';
@@ -647,7 +643,7 @@
      $selected = ((isset($option['value']) &&
                    in_array($option['value'], $select, TRUE)) ||
                   (in_array($option['text'], $select, TRUE))) ?
        $this->_conv_case(' selected', 'attrib') : '';
        $this->_conv_case(' selected="selected"', 'attrib') : '';
                   
      $options_str .= sprintf("<%s%s%s>%s</%s>\n",
                             $this->_conv_case('option', 'tag'),