php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40781 <input name="PHPSESSID" /> invalid HTML
Submitted: 2007-03-12 00:19 UTC Modified: 2007-03-13 15:19 UTC
From: php dot net at steltenpower dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.4.5 OS: Linux
Private report: No CVE-ID: None
 [2007-03-12 00:19 UTC] php dot net at steltenpower dot com
Description:
------------
<input type="hidden" name="PHPSESSID" value="..." />
is generated and the / makes it invalid HTML.

XHTML needs the /

So to be able to output both valid HTML and valid XHTML an ini variable or something is needed


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-12 09:29 UTC] tony2001@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2007-03-12 11:44 UTC] php dot net at steltenpower dot com
I'm using PHP's built-in session system through session_start() etc.

In the HTML output this results in lots of things of which
<input type="hidden" name="PHPSESSID" value="8748someLongId865" />
is part.

The
/
in there should be removed to make it valid HTML


sidenote:
The
/
is needed for XHTML (which might also need
name
replaced with
id)

So to be able to use the PHP built-in system for both valid HTML and valid XHTML a switch, flag, ini setting, or something is needed
 [2007-03-12 18:05 UTC] edink@php.net
Browsers from Netscape 4 and up have no problem parsing tags like 
<br /> so this is not going to be changed in order to keep xhtml 
compabtipility.
 [2007-03-13 15:19 UTC] php dot net at steltenpower dot com
Keeping the current thing as a default would be good.

Saying that it works on a few common browsers is forgetting about semantic web and accessibility.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC