Aleksander Machniak
2013-04-17 fe626833af5bcb251ae7d78afa863b896cb70547
program/lib/Roundcube/html.php
@@ -21,7 +21,7 @@
 * Class for HTML code creation
 *
 * @package    Framework
 * @subpackage HTML
 * @subpackage View
 */
class html
{
@@ -34,6 +34,7 @@
    public static $lc_tags = true;
    public static $common_attrib = array('id','class','style','title','align');
    public static $containers = array('iframe','div','span','p','h1','h2','h3','form','textarea','table','thead','tbody','tr','th','td','style','script');
    /**
     * Constructor
@@ -217,7 +218,7 @@
            $attr = array('src' => $attr);
        }
        return self::tag('iframe', $attr, $cont, array_merge(self::$common_attrib,
            array('src','name','width','height','border','frameborder')));
            array('src','name','width','height','border','frameborder','onload')));
    }
    /**
@@ -287,7 +288,7 @@
            }
            // attributes with no value
            if (in_array($key, array('checked', 'multiple', 'disabled', 'selected'))) {
            if (in_array($key, array('checked', 'multiple', 'disabled', 'selected', 'autofocus'))) {
                if ($value) {
                    $attrib_arr[] = $key . '="' . $key . '"';
                }
@@ -332,7 +333,16 @@
     */
    public static function quote($str)
    {
        return @htmlspecialchars($str, ENT_COMPAT, RCUBE_CHARSET);
        static $flags;
        if (!$flags) {
            $flags = ENT_COMPAT;
            if (defined('ENT_SUBSTITUTE')) {
                $flags |= ENT_SUBSTITUTE;
            }
        }
        return @htmlspecialchars($str, $flags, RCUBE_CHARSET);
    }
}
@@ -340,7 +350,8 @@
/**
 * Class to create an HTML input field
 *
 * @package HTML
 * @package    Framework
 * @subpackage View
 */
class html_inputfield extends html
{
@@ -350,6 +361,7 @@
        'type','name','value','size','tabindex','autocapitalize',
        'autocomplete','checked','onchange','onclick','disabled','readonly',
        'spellcheck','results','maxlength','src','multiple','placeholder',
        'autofocus',
    );
    /**
@@ -395,7 +407,8 @@
/**
 * Class to create an HTML password field
 *
 * @package HTML
 * @package    Framework
 * @subpackage View
 */
class html_passwordfield extends html_inputfield
{
@@ -405,9 +418,9 @@
/**
 * Class to create an hidden HTML input field
 *
 * @package HTML
 * @package    Framework
 * @subpackage View
 */
class html_hiddenfield extends html
{
    protected $tagname = 'input';
@@ -455,7 +468,8 @@
/**
 * Class to create HTML radio buttons
 *
 * @package HTML
 * @package    Framework
 * @subpackage View
 */
class html_radiobutton extends html_inputfield
{
@@ -485,7 +499,8 @@
/**
 * Class to create HTML checkboxes
 *
 * @package HTML
 * @package    Framework
 * @subpackage View
 */
class html_checkbox extends html_inputfield
{
@@ -515,7 +530,8 @@
/**
 * Class to create an HTML textarea
 *
 * @package HTML
 * @package    Framework
 * @subpackage View
 */
class html_textarea extends html
{
@@ -573,7 +589,8 @@
 * print $select->show('CH');
 * </pre>
 *
 * @package HTML
 * @package    Framework
 * @subpackage View
 */
class html_select extends html
{
@@ -638,7 +655,8 @@
/**
 * Class to build an HTML table
 *
 * @package HTML
 * @package    Framework
 * @subpackage View
 */
class html_table extends html
{