X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fforms.php;h=710f962be1fbf843fc64457af4f303c09046e5e5;hp=6acf361d00d2e58fce53f6e0187878c4e24616d1;hb=f79fb61d0ebd9fc028d00e8b832db9417ce63d9b;hpb=324ac3c54f72cb39a994d9a80a586fce591fca84 diff --git a/functions/forms.php b/functions/forms.php index 6acf361d..710f962b 100644 --- a/functions/forms.php +++ b/functions/forms.php @@ -76,7 +76,7 @@ function addInput($name, $value = '', $size = 0, $maxlength = 0) { * Function to create a selectlist from an array. * Usage: * name: html name attribute - * values: array ( key => value ) -> * default: the key that will be selected * usekeys: use the keys of the array as option value or not */ @@ -94,7 +94,7 @@ function addSelect($name, $values, $default = null, $usekeys = false) if(!$usekeys) $k = $v; $ret .= '\n"; } $ret .= "\n"; @@ -121,14 +121,14 @@ function addReset($value) { */ function addTextArea($name, $text = '', $cols = 40, $rows = 10, $attr = '') { return '\n"; + 'rows="'.(int)$rows .'" cols="'.(int)$cols.'" '. + $attr . '>'.htmlspecialchars($text) ."\n"; } /** * Make a
start-tag. */ -function addForm($action, $method = 'POST', $name = '', $enctype = '', $charset = '') +function addForm($action, $method = 'post', $name = '', $enctype = '', $charset = '') { if($name) { $name = ' name="'.$name.'"'; @@ -141,7 +141,7 @@ function addForm($action, $method = 'POST', $name = '', $enctype = '', $charset } return '\n"; + $enctype . $name . $charset . ">\n"; } ?> \ No newline at end of file