2002/css-validator/org/w3c/css/css StyleSheetParser.java,1.22,1.23

Update of /sources/public/2002/css-validator/org/w3c/css/css
In directory hutz:/tmp/cvs-serv16748/css

Modified Files:
	StyleSheetParser.java 
Log Message:
added fix for 0-length id in html code...

Index: StyleSheetParser.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/css/StyleSheetParser.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- StyleSheetParser.java	23 Oct 2011 19:47:21 -0000	1.22
+++ StyleSheetParser.java	24 Oct 2011 19:49:03 -0000	1.23
@@ -383,6 +383,10 @@
             } //ignore
 
             try {
+                if (id == null || id.length() == 0) {
+                    id = "nullId-" + Long.toHexString(System.currentTimeMillis());
+                    // TODO add an error/warning ?
+                }
                 selector.addId(new IdSelector(id.substring(1)));
             } catch (InvalidParamException e) {
                 style.removeThisRule();

Received on Monday, 24 October 2011 19:49:07 UTC