Re: width="n*" marked invalid on <COL>

Around about 01/09/02 08:21, Terry Teague scribbled ...

> Looking at the code, the CheckLength() function in attrs.c doesn't allow
> for the relative form of the multilength attribute value type (n*). The fix
> probably should only allow the relative form for HTML 4.0 or later.

   This fixes it (or, at least, allows it):

--8<--cut-here--
--- src/attrs.c.orig    Sun Dec 30 07:55:05 2001
+++ src/attrs.c Wed Jan  9 09:43:34 2002
@@ -1041,7 +1041,9 @@

          while (*p)
          {
-            if (!IsDigit(*p) && *p != '%')
+            if (!IsDigit(*p) &&
+                *p != '%' &&
+                !(*p == '*' && (lexer->versions & VERS_HTML40)))
              {
                  ReportAttrError(lexer, node, attval, 
BAD_ATTRIBUTE_VALUE);
                  break;
--8<--cut here--


   ... but,

a) is that right for the version check?

b) it doesn't limit it to <COL> (and what else?)

c) shouldn't it stop parsing the length upon the % or *? 
Otherwise "123*456" is deemed valid, isn't it?

-- 
[neil@fnx ~]# rm -f .signature
[neil@fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[neil@fnx ~]# exit

Received on Wednesday, 9 January 2002 04:55:55 UTC