6.0.0-beta1
7/10/25

[#4645] addParameter() adds additional characters to the URL
Summary addParameter() adds additional characters to the URL
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Resolved
Priority 3. High
Owners slusarz (at) horde (dot) org
Requester libregeek (at) gmail (dot) com
Created 11/10/2006 (6817 days ago)
Due
Updated 01/09/2007 (6757 days ago)
Assigned 12/08/2006 (6789 days ago)
Resolved 01/09/2007 (6757 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/09/2007 11:21:50 PM Jan Schneider State ⇒ Resolved
 
01/05/2007 02:22:41 PM Jan Schneider Comment #7
Priority ⇒ 3. High
Reply to this comment
A test exists in framework/Util/test/addParameter.phpt.
12/11/2006 06:02:47 PM Jan Schneider Comment #6 Reply to this comment
Another example is the initial url generation in IMP::getInitialUrl() 
when not using cookies. It's double encoding ampersands even though it 
is told not to, logging the user immediately out.
12/08/2006 11:00:45 AM Jan Schneider State ⇒ Assigned
 
11/24/2006 12:13:35 AM Jan Schneider Comment #5 Reply to this comment
The question is, did the change fix more problems than it produced. 
This might not have been working reliably in the past, but we are now 
getting more complaints then before. And we can probably work around 
the old behaviour which is better than fixing all those places where 
it's broken now.
11/23/2006 09:51:26 PM Michael Slusarz Comment #4
State ⇒ Feedback
Reply to this comment
No, it used to automatically detect whether existing ampersands are
already encoded in the URL or not. This is a BC break.
But this was precisely the issue that was fixed.  The previous code 
did not (and could not) reliably detect these ampersands - 
particularly with URLs that get passed between pages via forms (this 
was the reason for the fix in the first place).  This is an example 
(IMHO) of a necessary BC break to fix a larger problem elsewhere.
11/18/2006 11:19:31 AM Jan Schneider Comment #3
State ⇒ Assigned
Reply to this comment
No, it used to automatically detect whether existing ampersands are 
already encoded in the URL or not. This is a BC break.
11/18/2006 08:14:52 AM Michael Slusarz Comment #2
State ⇒ Not A Bug
Reply to this comment
How is this a bug?  You are asking Util::addParameter() to encode the 
ampersands in your URL, and that is what it is doing.
11/10/2006 12:41:03 PM Jan Schneider Assigned to Michael Slusarz
Summary ⇒ addParameter() adds additional characters to the URL
State ⇒ Assigned
Priority ⇒ 2. Medium
 
11/10/2006 11:27:43 AM libregeek (at) gmail (dot) com Comment #1
Priority ⇒ 3. High
State ⇒ Unconfirmed
Queue ⇒ Horde Framework Packages
Summary ⇒ The addParameter() adds additional characters to the URL.
Type ⇒ Bug
Reply to this comment
The  Horde_Form::addParameter add some extra characters to the URL 
when it is generated.

Steps to reproduce:

Define a class inherited from Horde_Form and instantiate the class. 
Add the parameters like this:

$form = &new EmpDocument_Form($variables, "Add Documents")

$renderer = &$form->getRenderer();

$main_url = Horde::applicationUrl('editemployee.php');

$edit_url = Util::addParameter($main_url, array('action' => 'add_doc', 
'emp_id'=> $emp_id));

$form->renderActive($renderer, $variables, $edit_url, 'post');



But  when the HTML form is generated it adds some extra characters 
like "amp;" to the URL. Here is the complete URL copied from the "View 
Source" of the browser.



Browser: Firefox-2.0

PHP-5.1.4

Horde-3.2CVS




Saved Queries