From: SourceForge.net <no...@so...> - 2012-10-16 07:11:29
|
Bugs item #3577566, was opened at 2012-10-16 00:11 Message generated for change (Tracker Item Submitted) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=547455&aid=3577566&group_id=76550 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Nobody/Anonymous (nobody) Summary: "select"s without "option"s should not be posted Initial Comment: if a form is loaded with a select field that does not have any option tags, most browsers will not post the field back at all. this is critical in some ASP applications where the site expects the field to be omitted, and when it is included causes the viewstate not to validate (i didn't write the site but it gave me a headache trying to figure it out). this is easily fixed by adding 1 line of code on line 239 in tidy_parser.php change: private function addWidgetToForm($node, $form, $enclosing_label) { $widget = $this->tags()->createTag($node->name, $this->attributes($node)); if (! $widget) { return; } $widget->setLabel($enclosing_label) ->addContent($this->innerHtml($node)); if ($node->name == 'select') { $widget->addTags($this->collectSelectOptions($node)); } $form->addWidget($widget); $this->indexWidgetById($widget); } to: private function addWidgetToForm($node, $form, $enclosing_label) { $widget = $this->tags()->createTag($node->name, $this->attributes($node)); if (! $widget) { return; } $widget->setLabel($enclosing_label) ->addContent($this->innerHtml($node)); if ($node->name == 'select') { if(count($widget->addTags($this->collectSelectOptions($node))) == 0){ return; } } $form->addWidget($widget); $this->indexWidgetById($widget); } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=547455&aid=3577566&group_id=76550 |