Home » HTML » HTML_QuickForm » Bug #3310
rendering static field without escaping value
Details
| Request #3310 | rendering static field without escaping value |
|---|---|
| Submitted | 2005-01-27 12:00 UTC |
| From | sebab at info dot com dot pl |
| Status | Bogus |
| Package | HTML_QuickForm |
| PHP Version | Irrelevant |
| OS | irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2005-01-27 12:00 UTC] sebab at info dot com dot pl
Description:
------------
Shouldn't value of static field be escaped while rendering to html? Is it this way by design or is it a bug?
Reproduce code:
---------------
<?php
require_once 'HTML/QuickForm.php';
$form =& new HTML_QuickForm('frmTest', 'get');
$renderer =& $form->defaultRenderer();
$form->addElement('submit', 'isubTest', 'Test Submit');
$st =& $form->addElement('static', 'staticTest', 'static:');
$form->setDefaults(array('staticTest'=>'foo <b>bar'));
if ($form->validate()) {
$form->freeze();
echo '<pre>';
var_dump($form->exportValues());
echo '</pre>';
}
$form->display();
?>
Expected result:
----------------
value of static field escaped
foo <b>bar
Actual result:
--------------
foo <b>bar