mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Merge branch '1.3' of github.com:cakephp/cakephp into 1.3
This commit is contained in:
commit
cdd8b615a1
3 changed files with 24 additions and 5 deletions
|
@ -261,8 +261,6 @@ class Sanitize {
|
|||
$data = str_replace("\r", "", $data);
|
||||
}
|
||||
|
||||
$data = str_replace("'", "'", str_replace("!", "!", $data));
|
||||
|
||||
if ($options['unicode']) {
|
||||
$data = preg_replace("/&#([0-9]+);/s", "&#\\1;", $data);
|
||||
}
|
||||
|
|
|
@ -290,7 +290,7 @@ 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) {
|
||||
|
@ -321,7 +321,7 @@ class FormHelper extends AppHelper {
|
|||
}
|
||||
|
||||
$this->setEntity($model . '.', true);
|
||||
$attributes = $this->_parseAttributes($htmlAttributes, null, '');
|
||||
$attributes = sprintf('action="%s" ', $action) . $this->_parseAttributes($htmlAttributes, null, '');
|
||||
return sprintf($this->Html->tags['form'], $attributes) . $append;
|
||||
}
|
||||
|
||||
|
|
|
@ -5829,7 +5829,28 @@ class FormHelperTest extends CakeTestCase {
|
|||
'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'),
|
||||
'/div'
|
||||
);
|
||||
$this->assertTags($result, $expected, true);
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$result = $this->Form->create('Contact', array(
|
||||
'type' => 'post',
|
||||
'url' => array(
|
||||
'controller' => 'controller',
|
||||
'action' => 'action',
|
||||
'?' => array('param1' => 'value1', 'param2' => 'value2')
|
||||
)
|
||||
));
|
||||
$expected = array(
|
||||
'form' => array(
|
||||
'id' => 'ContactAddForm',
|
||||
'method' => 'post',
|
||||
'action' => '/controller/action?param1=value1&param2=value2',
|
||||
'accept-charset' => $encoding
|
||||
),
|
||||
'div' => array('style' => 'display:none;'),
|
||||
'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'),
|
||||
'/div'
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue