Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing spacing between button tag attributes. Fixes #241

  • Loading branch information...
commit a8040506b0288683feb38602b1054ce3c7a2795b 1 parent 913450d
@ADmad ADmad authored
View
2  cake/libs/view/helpers/form.php
@@ -1170,7 +1170,7 @@ function button($title, $options = array()) {
return sprintf(
$this->Html->tags['button'],
$options['type'],
- $this->_parseAttributes($options, array('type'), '', ' '),
+ $this->_parseAttributes($options, array('type'), ' ', ''),
$title
);
}
View
3  cake/tests/cases/libs/view/helpers/form.test.php
@@ -4753,6 +4753,9 @@ function testButton() {
$result = $this->Form->button('Clear Form >', array('type' => 'reset'));
$this->assertTags($result, array('button' => array('type' => 'reset'), 'Clear Form >', '/button'));
+ $result = $this->Form->button('Clear Form >', array('type' => 'reset', 'id' => 'clearForm'));
+ $this->assertTags($result, array('button' => array('type' => 'reset', 'id' => 'clearForm'), 'Clear Form >', '/button'));
+
$result = $this->Form->button('<Clear Form>', array('type' => 'reset', 'escape' => true));
$this->assertTags($result, array('button' => array('type' => 'reset'), '&lt;Clear Form&gt;', '/button'));
Please sign in to comment.
Something went wrong with that request. Please try again.