This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4987 - XHTML 1.0 Validator is inserting a hidden input tag, leading to validation failure.
Summary: XHTML 1.0 Validator is inserting a hidden input tag, leading to validation fa...
Status: RESOLVED INVALID
Alias: None
Product: AppC Checker
Classification: Unclassified
Component: Core (show other bugs)
Version: unspecified
Hardware: All Windows XP
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL: http://econtriver.com/__BUG.php
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-27 03:03 UTC by Nik
Modified: 2007-08-27 03:21 UTC (History)
0 users

See Also:


Attachments

Description Nik 2007-08-27 03:03:08 UTC
http://econtriver.com/__BUG.php

I left this page up so you guys can see what is going on. If you navigate to the preceding page and then click the W3C XHTML 1.0 Validation image at the bottom of the page you will see the page fail validation with the following error:

Error  Line 79, Column 137: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.
="599ab6265110b0945f8d988711904fb0" />

The previous line of code that was triggering the error is not in my HTML, so I had the validator show the source code it was checking and found the following:

78# <!-- SiteSearch Google -->
79# <form method="get" action="http://www.google.com/search"><input type="hidden" name="PHPSESSID" value="8432a3c5def875fae677d8d0b27dfc8c" />
80# <p class="search_para">

If you go to the actual page and view source code, then you will see:

78#<!-- SiteSearch Google -->
79#<form method="get" action="http://www.google.com/search">
80#  <p class="search_para">

The validator added the PHPSESSID to my code when checking it.  This error indicates my code is failing, when it is actually correct.

Please let me know when you have the information you need, so that I can take down that BUG page.

This is from PHP source code:
<?php
session_start();
echo '<?xml version="1.0" encoding="utf-8" ?';
echo '>';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
____The remaining portion of the PHP source code is just the remainder of the HTML page.
Comment 1 Olivier Thereaux 2007-08-27 03:20:57 UTC
(In reply to comment #0)

> The validator added the PHPSESSID to my code when checking it. 

Absolutely not. Your php code adds this PHPSESSID input whenever the user-agent (browser, validator, search engine) does not accept the session cookies it tries to send. Try it.