Bugzilla – Bug 476
v.nu should report an error for Simon's "just a hash" test
Last modified: 2009-04-07 16:02:02 CEST
v.nu reports no error for http://simon.html5.org/test/validator/attribute-values/img-usemap/just-a-hash.html but should, since there's no way a usemap value can be a "valid hash-name reference" unless there's at least one character in that value after the hash. Seems like the HashName.java datatype checker for common.data.hash-name needs to be made more strict. Maybe the following? Index: HashName.java =================================================================== --- HashName.java (revision 404) +++ HashName.java (working copy) @@ -44,6 +44,8 @@ throw newDatatypeException("The empty string is not a valid hash-name reference."); } else if (literal.charAt(0) != '#') { throw newDatatypeException("A hash-name reference must start with \u201C#\u201D."); + } else if (literal.length() == 1) { + throw newDatatypeException("A hash-name reference must have at least one character after \u201C#\u201D."); } // Other cases }
Created attachment 75 [details] patch to datatype/HashName.java file
*** This bug has been marked as a duplicate of bug 323 ***