Issues

ZF-8822: Fieldset decorator has to ignore accept-charset attrib of mother

Issue Type: Bug Created: 2010-01-14T13:27:08.000+0000 Last Updated: 2012-06-02T03:06:51.000+0000 Status: Resolved Fix version(s): - 1.11.12 (22/Jun/12)

Reporter: Philip Iezzi (iezzip) Assignee: Frank Brückner (frosch) Tags: - Zend_Form

  • FixForZF1.12

Related issues: - ZF-7792

Attachments: - Fieldset.php.patch

Description

If you set attrib accept-charset for Zend_Form,

<

fieldset> will render with accept-charset too, which produces invalid XHTML. Solution is easy, just add 'accept-charset' into $stripAttribs array in Zend/Form/Decorator/Fieldset.php

<pre class="highlight">
Index: Fieldset.php
===================================================================
--- Fieldset.php    (revision 19215)
+++ Fieldset.php    (working copy)
@@ -39,20 +39,21 @@
     /**
      * Attribs that should be removed prior to rendering
      * @var array
      */
     public $stripAttribs = array(
         'action',
         'enctype',
         'helper',
         'method',
         'name',
+        'accept-charset',
     );
 
     /**
      * Fieldset legend
      * @var string
      */
     protected $_legend;
 
     /**
      * Default placement: surround content

Comments

Posted by Frank Brückner (frosch) on 2012-05-11T15:49:40.000+0000

Patch and unit test added.

Posted by Adam Lundrigan (adamlundrigan) on 2012-06-02T03:06:51.000+0000

Fixed in trunk (1.12.0): r24874

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts