PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

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" />