W3C home > Mailing lists > Public > www-validator-cvs@w3.org > October 2007

[Bug 5196] validator is trying to parse javascript strings for xhtml tags

From: <bugzilla@wiggum.w3.org>
Date: Mon, 15 Oct 2007 02:05:25 +0000
CC:
To: www-validator-cvs@w3.org
Message-Id: <E1IhFKf-0000gJ-Br@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5196

           Summary: validator is trying to parse javascript strings for
                    xhtml tags
           Product: Validator
           Version: 0.8.2
          Platform: All
               URL: http://validator.w3.org/#validate_by_input
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Parser
        AssignedTo: dave.null@w3.org
        ReportedBy: msleemail@gmail.com
         QAContact: www-validator-cvs@w3.org


It appears that the parser is trying to parse possible elements within
JavaScript code.

I believe the following xhtml is incorrectly marked as invalid:

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

<html xmlns="http://www.w3.org/1999/xhtml" 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/>';

</script></body></html>
---------snip-----------

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.
Received on Monday, 15 October 2007 02:05:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:54:59 GMT