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 4335 - HTML-style comments and markup in CSS confuses validator, throws ServletException: Timed out
Summary: HTML-style comments and markup in CSS confuses validator, throws ServletExcep...
Status: RESOLVED FIXED
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: Parser (show other bugs)
Version: CSS Validator
Hardware: Macintosh All
: P2 normal
Target Milestone: ---
Assignee: Jean-Guilhem Rouel
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
: 4349 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-19 13:54 UTC by Olivier Thereaux
Modified: 2008-03-17 15:05 UTC (History)
2 users (show)

See Also:


Attachments
servlet trace (1.25 KB, text/plain)
2007-02-19 13:58 UTC, Olivier Thereaux
Details

Description Olivier Thereaux 2007-02-19 13:54:16 UTC
Whenever the CSS parser of the validator finds HTML-style comments <!-- ... or other similar syntax (doctype declaration too), the parser trips up and throws the (wrong) exception ServletException: Timed out.

Debug info in console says: 

«
Exception in thread "servlet-runner:1" org.w3c.css.parser.analyzer.TokenMgrError: Lexical error at line 1, column 3.  Encountered: "d" (100), after : "<!"        at org.w3c.css.parser.analyzer.CssParserTokenManager.getNextToken(CssParserTokenManager.java:4032)        at org.w3c.css.parser.analyzer.CssParser.jj_ntk(CssParser.java:3766)        at org.w3c.css.parser.analyzer.CssParser.parserUnit(CssParser.java:337)
»

Jean-Gui is looking into it: it seems to have been created by a fix [1] for bug [2] 2919. Fixing appears to be tricky.


[1]http://dev.w3.org/cvsweb/2002/css-validator/org/w3c/css/parser/analyzer/CssParser.jj?rev=1.18&content-type=text/x-cvsweb-markup
[2]http://www.w3.org/Bugs/Public/show_bug.cgi?id=2919
Comment 1 Olivier Thereaux 2007-02-19 13:58:52 UTC
Created attachment 455 [details]
servlet trace

full stack trace from a similar case.
Comment 2 Olivier Thereaux 2007-02-26 00:01:55 UTC
*** Bug 4349 has been marked as a duplicate of this bug. ***
Comment 3 Yves Lafon 2008-03-17 15:05:34 UTC
Fixed by adding a special case in the grammar.
See http://qa-dev.w3.org:8001/