Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.16

Bug #5974 hierselect does not oprate html entities
Submitted: 2005-11-15 21:45 UTC
From: dobes at lnx dot cz Assigned: avb
Status: Closed Package: HTML_QuickForm
PHP Version: 4.4.0 OS: Gentoo
Roadmaps: (Not assigned)    

 [2005-11-15 21:45 UTC] dobes at lnx dot cz
Description: ------------ When you have in hierselect html entities like °. When it is this in default, displaying is OK, but if you can choose it, from hierselect menu, you can see the code of html entities (like &deg;). Test script: --------------- <?php require_once 'HTML/QuickForm.php'; $form = new HTML_QuickForm('example'); $select1[0] = ''; $select1[1] = 'Temperature'; $select1[2] = 'Ratio'; // second select $select2[0][0] = ''; $select2[1][0] = '°C'; $select2[1][1] = '°F'; $select2[1][2] = '°R'; $select2[2][0] = '1'; $select2[2][1] = '%'; $select2[2][2] = '‰'; // Create the Element $sel =& $form->addElement('hierselect', 'choose', 'Choose Units:'); // And add the selection options $sel->setOptions(array($select1, $select2)); $form->display(); ?> Expected result: ---------------- correct display of html entities. Actual result: -------------- html entities in select form (in Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051013 Firefox/1.0.7).


 [2006-02-26 19:34 UTC] avb
Seems like we'll need to somehow unescape the HTML entities. There is a (hackish) solution for this in Prototype js library.
 [2006-06-18 20:03 UTC] avb (Alexey Borzov)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.