From bd4209e20979f43ccacae81ef5ce4adc80018ee2 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Sun, 09 Sep 2007 13:45:24 -0400 Subject: [PATCH] Ensure XHTML validation --- program/include/rcmail_template.inc | 2 +- program/steps/mail/compose.inc | 2 +- program/include/rcube_html.inc | 8 ++++---- skins/default/templates/compose.html | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/program/include/rcmail_template.inc b/program/include/rcmail_template.inc index a3937c8..4acc717 100644 --- a/program/include/rcmail_template.inc +++ b/program/include/rcmail_template.inc @@ -345,7 +345,7 @@ */ 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); } diff --git a/program/include/rcube_html.inc b/program/include/rcube_html.inc index 5ebfa32..a31594a 100644 --- a/program/include/rcube_html.inc +++ b/program/include/rcube_html.inc @@ -297,14 +297,14 @@ $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'), $value); // regular tag attributes else @@ -647,7 +647,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'), diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index a956ecf..c45183c 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -145,7 +145,7 @@ $header = 'bcc'; } - $allow_attrib = array('id', 'class', 'style', 'cols', 'rows', 'wrap', 'tabindex'); + $allow_attrib = array('id', 'class', 'style', 'cols', 'rows', 'tabindex'); $field_type = 'textarea'; break; diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html index 99049f8..4378c17 100644 --- a/skins/default/templates/compose.html +++ b/skins/default/templates/compose.html @@ -95,7 +95,7 @@ </tr><tr> <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> <tr> -- Gitblit v1.9.1