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

html_quickform addelement attribute include url vars

Details

Submitted2006-01-08 19:40 UTC
Fromdsball_ma at yahoo dot com
StatusWont fix
PackageHTML_QuickForm
PHP Version5.0.3
OSLinux
Roadmaps(Not assigned)

Comments

[2006-01-08 19:40 UTC] dsball_ma at yahoo dot com

Description:
------------
When attempting to add an element to a form using the following syntax:

$form->addElement('button', null, "CREATE FEATURE","onclick=\"javascript: urlFunction(this.form, 'script.php?task=$task&secondary=$secondary';}\"");

The ampersand in the url within the javascript function is automatically translated to &

Should it be left up to the developer to translate the url or special characters? This is restricting.

Test script:
---------------
$form = new HTML_QuickForm();
$form->addElement('button', null, "CREATE FEATURE","onclick=\"javascript: urlFunction(this.form, 'script.php?task=$task&secondary=$secondary';}\"");
$form->display();

Expected result:
----------------
<input onclick="javascript: iurlFunction(this.form, 'script.php?task=insertTableObj&secondary=feature';}" value="CREATE FEATURE" type="button" />

Actual result:
--------------
<input onclick="javascript: iurlFunction(this.form, 'script.php?task=insertTableObj&secondary=feature';}" value="CREATE FEATURE" type="button" />