PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_QuickForm » Bug #3310

rendering static field without escaping value

Details

Request #3310rendering static field without escaping value
Submitted2005-01-27 12:00 UTC
Fromsebab at info dot com dot pl
StatusBogus
PackageHTML_QuickForm
PHP VersionIrrelevant
OSirrelevant
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