Changeset 8780304 in github


Ignore:
Timestamp:
Jan 12, 2010 2:24:41 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
da1722a
Parents:
27e9a5b
Message:
  • support maxlength and src attributes in html_inputfield (#1486421), wrapped some long lines
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/html.php

    r23a2eec r8780304  
    3333    protected $content; 
    3434 
     35    public static $lc_tags = true; 
    3536    public static $common_attrib = array('id','class','style','title','align'); 
    36     public static $containers = array('iframe','div','span','p','h1','h2','h3','form','textarea','table','tr','th','td','style','script'); 
    37     public static $lc_tags = true; 
     37    public static $containers = array('iframe','div','span','p','h1','h2','h3', 
     38        'form','textarea','table','tr','th','td','style','script'); 
    3839 
    3940    /** 
     
    130131            $attr = array('src' => $attr); 
    131132        } 
    132         return self::tag('img', $attr + array('alt' => ''), null, array_merge(self::$common_attrib, array('src','alt','width','height','border','usemap'))); 
     133        return self::tag('img', $attr + array('alt' => ''), null, array_merge(self::$common_attrib, 
     134            array('src','alt','width','height','border','usemap'))); 
    133135    } 
    134136 
     
    146148            $attr = array('href' => $attr); 
    147149        } 
    148         return self::tag('a', $attr, $cont, array_merge(self::$common_attrib, array('href','target','name','onclick','onmouseover','onmouseout','onmousedown','onmouseup'))); 
     150        return self::tag('a', $attr, $cont, array_merge(self::$common_attrib, 
     151            array('href','target','name','onclick','onmouseover','onmouseout','onmousedown','onmouseup'))); 
    149152    } 
    150153 
     
    193196            $attr = array('src' => $attr); 
    194197        } 
    195         return self::tag('iframe', $attr, $cont, array_merge(self::$common_attrib, array('src','name','width','height','border','frameborder'))); 
     198        return self::tag('iframe', $attr, $cont, array_merge(self::$common_attrib, 
     199            array('src','name','width','height','border','frameborder'))); 
    196200    } 
    197201 
     
    264268    protected $tagname = 'input'; 
    265269    protected $type = 'text'; 
    266     protected $allowed = array('type','name','value','size','tabindex','autocomplete','checked','onchange','onclick','disabled','readonly','spellcheck','results'); 
     270    protected $allowed = array('type','name','value','size','tabindex', 
     271        'autocomplete','checked','onchange','onclick','disabled','readonly', 
     272        'spellcheck','results','maxlength','src'); 
    267273 
    268274    public function __construct($attrib = array()) 
     
    432438{ 
    433439    protected $tagname = 'textarea'; 
    434     protected $allowed = array('name','rows','cols','wrap','tabindex','onchange','disabled','readonly','spellcheck'); 
     440    protected $allowed = array('name','rows','cols','wrap','tabindex', 
     441        'onchange','disabled','readonly','spellcheck'); 
    435442 
    436443    /** 
     
    462469        } 
    463470 
    464         return self::tag($this->tagname, $this->attrib, $value, array_merge(self::$common_attrib, $this->allowed)); 
     471        return self::tag($this->tagname, $this->attrib, $value, 
     472            array_merge(self::$common_attrib, $this->allowed)); 
    465473    } 
    466474} 
     
    489497    protected $tagname = 'select'; 
    490498    protected $options = array(); 
    491     protected $allowed = array('name','size','tabindex','autocomplete','multiple','onchange','disabled'); 
     499    protected $allowed = array('name','size','tabindex','autocomplete', 
     500        'multiple','onchange','disabled'); 
    492501     
    493502    /** 
     
    547556{ 
    548557    protected $tagname = 'table'; 
    549     protected $allowed = array('id','class','style','width','summary','cellpadding','cellspacing','border'); 
     558    protected $allowed = array('id','class','style','width','summary', 
     559        'cellpadding','cellspacing','border'); 
     560 
    550561    private $header = array(); 
    551562    private $rows = array(); 
Note: See TracChangeset for help on using the changeset viewer.