Fixing form action attributes being double encoded with

querystring attributes.
Fixes #1748
This commit is contained in:
Mark Story 2011-06-23 14:06:35 -07:00
parent 68378f2d06
commit d6e262da2d
2 changed files with 4 additions and 3 deletions

View file

@ -314,7 +314,8 @@ class FormHelper extends AppHelper {
}
$this->requestType = strtolower($options['type']);
$htmlAttributes['action'] = $this->url($options['action']);
$action = $this->url($options['action']);
unset($options['type'], $options['action']);
if ($options['default'] == false) {
@ -351,7 +352,7 @@ class FormHelper extends AppHelper {
}
$this->setEntity($model . '.', true);
return $this->Html->useTag('form', $htmlAttributes) . $append;
return $this->Html->useTag('form', $action, $htmlAttributes) . $append;
}
/**

View file

@ -38,7 +38,7 @@ class HtmlHelper extends AppHelper {
'metalink' => '<link href="%s"%s/>',
'link' => '<a href="%s"%s>%s</a>',
'mailto' => '<a href="mailto:%s" %s>%s</a>',
'form' => '<form%s>',
'form' => '<form action="%s"%s>',
'formend' => '</form>',
'input' => '<input name="%s"%s/>',
'textarea' => '<textarea name="%s"%s>%s</textarea>',