From 39f883e1f9fab83a47b76fb4802c2d01fa9c4e76 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Tue, 27 Nov 2012 12:13:07 -0500
Subject: [PATCH] Unset mime-magic location in order to let PHP use the default location
---
program/include/html.php | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/program/include/html.php b/program/include/html.php
index 0e89d77..8d0996e 100644
--- a/program/include/html.php
+++ b/program/include/html.php
@@ -301,7 +301,7 @@
$attrib_arr[] = $key . '="' . Q($value, 'strict', false) . '"';
}
else {
- $attrib_arr[] = $key . '="' . Q($value) . '"';
+ $attrib_arr[] = $key . '="' . htmlspecialchars($value, ENT_COMPAT, RCMAIL_CHARSET) . '"';
}
}
return count($attrib_arr) ? ' '.implode(' ', $attrib_arr) : '';
@@ -317,7 +317,8 @@
{
protected $tagname = 'input';
protected $type = 'text';
- protected $allowed = array('type','name','value','size','tabindex',
+ protected $allowed = array(
+ 'type','name','value','size','tabindex','autocapitalize',
'autocomplete','checked','onchange','onclick','disabled','readonly',
'spellcheck','results','maxlength','src','multiple','placeholder');
@@ -642,9 +643,9 @@
$cell->content = $cont;
$this->rows[$this->rowindex]->cells[$this->colindex] = $cell;
- $this->colindex++;
+ $this->colindex += max(1, intval($attr['colspan']));
- if ($this->attrib['cols'] && $this->colindex == $this->attrib['cols']) {
+ if ($this->attrib['cols'] && $this->colindex >= $this->attrib['cols']) {
$this->add_row();
}
}
--
Gitblit v1.9.1