From b4033556bb721349b00671fe7fe7db2d474e1e71 Mon Sep 17 00:00:00 2001 From: Michael Klier Date: Tue, 17 Nov 2009 10:21:14 +0100 Subject: form method should be lowercase and action should be set always darcs-hash:20091117092114-23886-69852bb75c1a5d630797741c736159b726dfd334.gz --- inc/form.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'inc/form.php') diff --git a/inc/form.php b/inc/form.php index 56afd3fec..4e245c93a 100644 --- a/inc/form.php +++ b/inc/form.php @@ -63,14 +63,20 @@ class Doku_Form { if(!is_array($params)) { $this->params = array('id' => $params); if ($action !== false) $this->params['action'] = $action; - if ($method !== false) $this->params['method'] = $method; + if ($method !== false) $this->params['method'] = strtolower($method); if ($enctype !== false) $this->params['enctype'] = $enctype; } else { $this->params = $params; } if (!isset($this->params['method'])) { - $this->params['method'] = 'POST'; + $this->params['method'] = 'post'; + } else { + $this->params['method'] = strtolower($this->params['method']); + } + + if (!isset($this->params['action'])) { + $this->params['action'] = ''; } $this->addHidden('sectok', getSecurityToken()); -- cgit v1.2.3