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 3298 - Validator incorrectly interprets HTML fragments in a JavaScript string as misplaced elements
Summary: Validator incorrectly interprets HTML fragments in a JavaScript string as mis...
Status: RESOLVED INVALID
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Terje Bless
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-19 15:41 UTC by Artie
Modified: 2006-05-19 15:45 UTC (History)
0 users

See Also:


Attachments

Description Artie 2006-05-19 15:41:39 UTC
One of our web applications uses an array of strings containing anchor tags for dynamically building out a menu system, like this:

menu1[0] = '<a href="http://someurl.com/there">Some URL</a>';

This is inside a valid <script type="text/javascript"> tag, but the validator complains with the following:

document type does not allow element "a" here.

The DOCTYPE is XHTML 1.0 Transitional:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

The rest of the page validates just fine.
Comment 1 Bj 2006-05-19 15:45:26 UTC
See http://esw.w3.org/topic/ValidationProblems