- From: <bugzilla@jessica.w3.org>
- Date: Tue, 13 Jan 2015 08:33:30 +0000
- To: www-validator-cvs@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27818
Bug ID: 27818
Summary: Very confusing messages if malformed comment or stray
BODY element encountered in HEAD
Product: Validator
Version: HEAD
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: HTML5
Assignee: mike+validator@w3.org
Reporter: mark.rogers@powermapper.com
QA Contact: www-validator-cvs@w3.org
1) Very confusing error messages if malformed comment encountered in HEAD
<!DOCTYPE html>
<html>
<head>
<-- malformed comment -->
<meta name="description" content="blah" >
</head>
The first part of the message is ok, though the suggested fix isn't:
"Bad character - after <. Probable cause: Unescaped <. Try escaping it as
<."
After that things get very confusing since the malformed comment is interpreted
as the start of the BODY, and following messages are emitted:
"Element meta is missing one or more of the following attributes: itemprop,
property."
"Attribute name not allowed on element meta at this point."
2) It's even more confusing if HEAD contains a stray BODY element added by
accident:
<!DOCTYPE html>
<html>
<head>
<br>
<meta name="description" content="blah" >
</head>
The first error is
"Attribute name not allowed on element meta at this point."
Took me a while to figure out (even with source code) since the error can be
some distance from the trigger element, and the trigger element can be very
hard to spot.
I guess error recovery on the malformed comment might be possible. The second
one looks much harder to fix due to tag omission rules.
Best Regards
Mark
--
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Tuesday, 13 January 2015 08:33:32 UTC