ソースを参照

ZF-8822: Fieldset decorator should strip accept-charset

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24874 44c647ce-9c0f-0410-b52a-842ac1e357ba
adamlundrigan 13 年 前
コミット
2234da3e1b

+ 1 - 0
library/Zend/Form/Decorator/Fieldset.php

@@ -46,6 +46,7 @@ class Zend_Form_Decorator_Fieldset extends Zend_Form_Decorator_Abstract
         'helper',
         'method',
         'name',
+        'accept-charset',
     );
 
     /**

+ 14 - 0
tests/Zend/Form/Decorator/FieldsetTest.php

@@ -229,6 +229,20 @@ class Zend_Form_Decorator_FieldsetTest extends PHPUnit_Framework_TestCase
                                 ->render('content');
         $this->assertContains('<fieldset id="fieldset-id"', $html);
     }
+
+    /**
+     * @group ZF-8822
+     */
+    public function testStripAcceptCharsetAttribute()
+    {
+        $form = new Zend_Form();
+        $form->setAttrib('accept-charset', 'ISO-8859-15');
+        $form->setView($this->getView());
+
+        $html = $this->decorator->setElement($form)->render('');
+
+        $this->assertEquals('<fieldset></fieldset>', $html);
+    }
 }
 
 // Call Zend_Form_Decorator_FieldsetTest::main() if this source file is executed directly.