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 5196 - validator is trying to parse javascript strings for xhtml tags
Summary: validator is trying to parse javascript strings for xhtml tags
Alias: None
Product: Validator
Classification: Unclassified
Component: Parser (show other bugs)
Version: 0.8.2
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
Depends on:
Reported: 2007-10-15 02:05 UTC by Michael Lee
Modified: 2007-10-15 04:41 UTC (History)
0 users

See Also:


Description Michael Lee 2007-10-15 02:05:25 UTC
It appears that the parser is trying to parse possible elements within JavaScript code.

I believe the following xhtml is incorrectly marked as invalid:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">

<html xmlns="" xml:lang="en" lang="en"><head>

    <title>Break Validator</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head><body><script type='text/javascript'>

var a = '<br/>';


The JavaScript variable assignment statement contains a string that coincidentally resembles an xhtml element.  The validator is parsing the text as if it contains an element in the document and then marking the element as not allowed in the current context.
Comment 1 Olivier Thereaux 2007-10-15 04:41:49 UTC
Hi Michael,

This is a FAQ. See: