php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28316 use_trans_id causes invalid XHTML strict output
Submitted: 2004-05-07 16:33 UTC Modified: 2004-05-09 18:04 UTC
From: nano at spamcop dot net Assigned:
Status: Not a bug Package: Session related
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
 [2004-05-07 16:33 UTC] nano at spamcop dot net
Description:
------------
When use_trans_sid=on, this will add a hidden field (<input>) right after the form element start tag (<form>).
Problem is that the XHTML Strict DTD forbids inline
elements in the <form> element if they are not enclosed themselves in whatever block elements allowed in <form>, such as <fieldset>, <p>, <div>, etc.


Reproduce code:
---------------
(This is only for illustration purpose).

<form enctype="..." method="..." action="...">
<fieldset>
<legend>Test</legend>
<input accesskey="..." type="text" name="..." />
<input accesskey="2" type="submit" name="test" value="OK" />
</fieldset>
</form>

Expected result:
----------------
(Feature request: the session info should not be added after <form> start tag, but right after first <input> tag, like below in between brackets [ ]).

<form enctype="..." method="..." action="...">
<fieldset>
<legend>Test</legend>
<input accesskey="..." type="text" name="..." />
[<input type="hidden" name="PHPSESSID" value="..." />]
<input accesskey="2" type="submit" name="test" value="OK" />
</fieldset>
</form>

Actual result:
--------------
(This to illustrate the fact that an <input> element (type inline) is not directly allowed in a <form> element by XHTML Strict DTD, although it is permitted by XHTML Transitional DTD).

<form enctype="..." method="..." action="...">[<input type="hidden" name="PHPSESSID" value="..." />]
<fieldset>
<legend>Test</legend>
<input accesskey="..." type="text" name="..." />
<input accesskey="2" type="submit" name="test" value="OK" />
</fieldset>
</form>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-09 18:04 UTC] magnus@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Remove form from url_rewrite.tags and put the correct information where you want it yourself.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 12:01:31 2024 UTC