Home » HTML » HTML_QuickForm » Bug #6444
html_quickform addelement attribute include url vars
Details
| Submitted | 2006-01-08 19:40 UTC |
|---|---|
| From | dsball_ma at yahoo dot com |
| Status | Wont fix |
| Package | HTML_QuickForm |
| PHP Version | 5.0.3 |
| OS | Linux |
| 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" />