diff --git a/library/Zend/Form/Form.php b/library/Zend/Form/Form.php index 4fc94f920d5..0145b58b13a 100644 --- a/library/Zend/Form/Form.php +++ b/library/Zend/Form/Form.php @@ -106,7 +106,7 @@ class Form extends Fieldset implements FormInterface * * @var bool */ - protected $preferFormInputFilter = false; + protected $preferFormInputFilter = true; /** * Are the form elements/fieldsets wrapped by the form name ? diff --git a/tests/ZendTest/Form/FormTest.php b/tests/ZendTest/Form/FormTest.php index 029129ea821..2ede1dd59e4 100644 --- a/tests/ZendTest/Form/FormTest.php +++ b/tests/ZendTest/Form/FormTest.php @@ -1640,6 +1640,9 @@ public function testInputFilterOrderOfPrecedence1() ->isRequired()); } + /** + * @group 5015 + */ public function testCanSetPreferFormInputFilterFlagViaSetOptions() { $flag = ! $this->form->getPreferFormInputFilter(); @@ -1649,6 +1652,9 @@ public function testCanSetPreferFormInputFilterFlagViaSetOptions() $this->assertSame($flag, $this->form->getPreferFormInputFilter()); } + /** + * @group 5015 + */ public function testFactoryCanSetPreferFormInputFilterFlag() { $factory = new Factory(); @@ -1662,4 +1668,9 @@ public function testFactoryCanSetPreferFormInputFilterFlag() $this->assertSame($flag, $form->getPreferFormInputFilter()); } } + + public function testPreferFormInputFilterFlagIsEnabledByDefault() + { + $this->assertTrue($this->form->getPreferFormInputFilter()); + } }