php.net |  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.

eg:

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

becomes:

<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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-22 11:19 UTC] sniper@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 27 08:03:38 2021 UTC