Permalink
Browse files

Fixing form action attributes being double encoded with

querystring attributes.
Fixes #1748
  • Loading branch information...
1 parent 68378f2 commit d6e262da2d1607e69345927b9bb1964671879232 @markstory markstory committed Jun 23, 2011
Showing with 4 additions and 3 deletions.
  1. +3 −2 lib/Cake/View/Helper/FormHelper.php
  2. +1 −1 lib/Cake/View/Helper/HtmlHelper.php
View
5 lib/Cake/View/Helper/FormHelper.php
@@ -314,7 +314,8 @@ public function create($model = null, $options = array()) {
}
$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 @@ public function create($model = null, $options = array()) {
}
$this->setEntity($model . '.', true);
- return $this->Html->useTag('form', $htmlAttributes) . $append;
+ return $this->Html->useTag('form', $action, $htmlAttributes) . $append;
}
/**
View
2 lib/Cake/View/Helper/HtmlHelper.php
@@ -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>',

0 comments on commit d6e262d

Please sign in to comment.