|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20575 arg-separator.output default value causes invalid HTML
Submitted: 2002-11-22 11:18 UTC Modified: 2002-11-22 11:19 UTC
From: tom dot pike at xiven dot com Assigned:
Status: Not a bug Package: URL related
PHP Version: 4.2.3 OS: Linux 2.2.19
Private report: No CVE-ID: None
 [2002-11-22 11:18 UTC] tom dot pike at xiven dot com
The arg-separator.output default value of "&" causes an invalid HTML/XHTML page to be displayed when PHP attaches the PHPSESSID to any hrefs on the page that already have a querystring.


<a href="example.php?page=1">


<a href="example.php?page=1&PHPSESSID=xxxxxxxxxxx">

which is invalid HTML.  It should be:

<a href="example.php?page=1&amp;PHPSESSID=xxxxxxxxxxx">

This issue causes problems when sending pages as application/xhtml+xml as Mozilla will detect the error and refuse to display the page.

Changing the default value (to "&amp;") should theoretically not cause any backwards compatibility issues since it gets translated (to "&") by the web browser.  It will however, help those of us who _do not_ have access to the PHP configuration files on the web server.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-22 11:19 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 19:01:32 2024 UTC