Ensure XHTML validation

release-0.6
thomascube 17 years ago
parent e64fe07c47
commit bd4209e209

@ -345,7 +345,7 @@ class rcmail_template extends rcube_html_page
*/ */
function parse_with_globals($input) function parse_with_globals($input)
{ {
$GLOBALS['__comm_path'] = $GLOBALS['COMM_PATH']; $GLOBALS['__comm_path'] = urlencode($GLOBALS['COMM_PATH']);
return preg_replace('/\$(__[a-z0-9_\-]+)/e', '$GLOBALS["\\1"]', $input); return preg_replace('/\$(__[a-z0-9_\-]+)/e', '$GLOBALS["\\1"]', $input);
} }

@ -297,14 +297,14 @@ class rcube_form_element
$value = Q($value, 'strict', FALSE); $value = Q($value, 'strict', FALSE);
// attributes with no value // 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) if ($value)
$attrib_arr[] = $key; $attrib_arr[] = sprintf('%s="%s"', $this->_conv_case($key, 'attrib'), $key);
} }
// don't convert size of value attribute // don't convert size of value attribute
else if ($key=='value') 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'), $value);
// regular tag attributes // regular tag attributes
else else
@ -647,7 +647,7 @@ class select extends rcube_form_element
$selected = ((isset($option['value']) && $selected = ((isset($option['value']) &&
in_array($option['value'], $select, TRUE)) || in_array($option['value'], $select, TRUE)) ||
(in_array($option['text'], $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", $options_str .= sprintf("<%s%s%s>%s</%s>\n",
$this->_conv_case('option', 'tag'), $this->_conv_case('option', 'tag'),

@ -145,7 +145,7 @@ function rcmail_compose_headers($attrib)
$header = 'bcc'; $header = 'bcc';
} }
$allow_attrib = array('id', 'class', 'style', 'cols', 'rows', 'wrap', 'tabindex'); $allow_attrib = array('id', 'class', 'style', 'cols', 'rows', 'tabindex');
$field_type = 'textarea'; $field_type = 'textarea';
break; break;

@ -95,7 +95,7 @@ function rcmail_toggle_display(id)
</tr><tr> </tr><tr>
<td style="width:100%; height:90%; vertical-align:top;"> <td style="width:100%; height:90%; vertical-align:top;">
<roundcube:object name="composeBody" id="compose-body" form="form" cols="80" rows="20" wrap="virtual" tabindex="7" /> <roundcube:object name="composeBody" id="compose-body" form="form" cols="80" rows="20" tabindex="7" />
<table border="0" cellspacing="0" width="100%" summary=""><tbody> <table border="0" cellspacing="0" width="100%" summary=""><tbody>
<tr> <tr>

Loading…
Cancel
Save