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 2308 - an html file uploaded fails validation, same code pasted works
Summary: an html file uploaded fails validation, same code pasted works
Alias: None
Product: Validator
Classification: Unclassified
Component: Parser (show other bugs)
Version: 0.7.0
Hardware: Macintosh All
: P2 normal
Target Milestone: ---
Assignee: Terje Bless
QA Contact: qa-dev tracking
Depends on:
Reported: 2005-09-27 21:33 UTC by Lorin Rivers
Modified: 2005-10-18 07:26 UTC (History)
0 users

See Also:

this document fails validation, only when uploaded (533 bytes, text/html)
2005-09-27 21:34 UTC, Lorin Rivers

Description Lorin Rivers 2005-09-27 21:33:49 UTC
The validate via upload reports errors that do not exist. It appears as if extra bogus characters are 
inserted in the header.

Pasting the same content into the appropriate field validates fine.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="" xml:lang="en" lang="en">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <p>Here is some text</p>
    <p><a onclick=",'_blank');return false;" href="">Some 
Other Site</a></p>
Comment 1 Lorin Rivers 2005-09-27 21:34:51 UTC
Created attachment 393 [details]
this document fails validation, only when uploaded
Comment 2 Olivier Thereaux 2005-10-18 07:26:54 UTC
Hello Lorin,

your document (as attached) has a bogus (non-utf-8) character after encoding="utf-8"?>

The validator is right to complain about it.

The fact that the error does not appear in direct input is only thanks to the fact that the garbage character 
is not kept through copy-pasting  (thanks to your OS, clipboad and/or browser).

How to fix: just remove the first few lines until the end of the doctype, and copy-paste from a correct