From:             nano at spamcop dot net
Operating system: Irrelevant
PHP version:      Irrelevant
PHP Bug Type:     Session related
Bug description:  use_trans_id causes invalid XHTML strict output 

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>

-- 
Edit bug report at http://bugs.php.net/?id=28316&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28316&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28316&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28316&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28316&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28316&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28316&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28316&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28316&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28316&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28316&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28316&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28316&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28316&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28316&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28316&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28316&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28316&r=float

Reply via email to