Thomas
2013-10-17 f0b2ed87fc67f8bbba522a60395099cb0d622c6a
program/lib/Roundcube/html.php
@@ -35,6 +35,7 @@
    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
     *
@@ -169,7 +170,7 @@
            $attr = array('href' => $attr);
        }
        return self::tag('a', $attr, $cont, array_merge(self::$common_attrib,
        array('href','target','name','rel','onclick','onmouseover','onmouseout','onmousedown','onmouseup')));
            array('href','target','name','rel','onclick','onmouseover','onmouseout','onmousedown','onmouseup')));
    }
    /**
@@ -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);
    }
}
@@ -675,7 +685,7 @@
        }
        $cell = new stdClass;
        $cell->attrib = $attr;
        $cell->attrib  = $attr;
        $cell->content = $cont;
        $this->rows[$this->rowindex]->cells[$this->colindex] = $cell;
@@ -699,16 +709,16 @@
        }
        $cell = new stdClass;
        $cell->attrib = $attr;
        $cell->content = $cont;
        $cell->attrib   = $attr;
        $cell->content  = $cont;
        $this->header[] = $cell;
    }
     /**
    /**
     * Remove a column from a table
     * Useful for plugins making alterations
     *
     * @param string $class
     *
     * @param string $class
     */
    public function remove_column($class)
    {
@@ -761,6 +771,11 @@
            $index = $this->rowindex;
        }
        // make sure row object exists (#1489094)
        if (!$this->rows[$index]) {
            $this->rows[$index] = new stdClass;
        }
        $this->rows[$index]->attrib = $attr;
    }
@@ -788,8 +803,9 @@
     */
    public function show($attrib = null)
    {
        if (is_array($attrib))
        if (is_array($attrib)) {
            $this->attrib = array_merge($this->attrib, $attrib);
        }
        $thead = $tbody = "";
@@ -831,7 +847,7 @@
     */
    public function size()
    {
      return count($this->rows);
        return count($this->rows);
    }
    /**