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 #4105

Unexpected behaviour with special chars for default values

Details

Submitted2005-04-08 18:51 UTC
Fromsteffen at steffen-gebert dot de
StatusBogus
PackageHTML_QuickForm
PHP Version4.3.11
OSWindows XP
Roadmaps(Not assigned)

Comments

[2005-04-08 18:51 UTC] steffen at steffen-gebert dot de

Description:
------------
QF-Version: 3.2.4pl1

I found sth unexpected using a script like attached:

The default value in filed1 is set as
test value &, ü, ü

The output is:
test value &, ü, ü

So - why?
Weather you should pass htmlentite'd code - so it should return exactly the same as passed.
Otherwise you could pass code with special chars like ü, ß and so on. So it should be htmlentitied ();

What I'm getting at the moment is a mix of both and so I'm not able to have a output free of ü's.

But & is always replaced to & not bothering what's the next char.

Reproduce code:
---------------
<?php
require_once("HTML/QuickForm.php");

$form = new HTML_QuickForm();

$defaultsArray = array('field1' => 'test value &, ü, ü');

$form->setDefaults($defaultsArray);

$form->addElement('text', 'field1', 'Test:');

$form->display();

?>