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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tom dot pike at xiven dot com
New email:
PHP Version: OS:

 

 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC