Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1 XHTML bug: <div> always uppercase.

open
nobody
None
5
2002-07-01
2002-07-01
Andrea Bocci
No

Working on converting the GCC website from HTML to
XHTML, I've found out that Meta--HTML always
translates a <div> tag as <DIV > (note the uppercase
and trailing whitespace), thus making it impossible to
obtain full XHTML compliance (wich requires lowercase
tags).
I've seen this behaviour is present in both Meta-HTML
5.091 and 6.11.01.

Investigating a bit, I've found the "guilty" piece of code in
libmhtml/mathfuncs.c:
...
if (get_positional_arg (vars, 0) == (char *)NULL)
{
bprintf_insert (page, start, "<DIV %s>",
mhtml_funargs (vars));
*newstart += 4;
}
else
...

I suggest to correct it into somthing like
...
if (get_positional_arg (vars, 0) == (char *)NULL)
{
if (mhtml_funargs (vars) == (char *)NULL)
bprintf_insert (page, start, "<div>");
else
bprintf_insert (page, start, "<div %s>",
mhtml_funargs (vars));
*newstart += 4;
}
else
...

I've tried it and it works for the GCC web site, but don't
know if it skrews up the <div> internal.
Anyway, I'm attaching a patch to fix it as proposed...

Discussion

  • Andrea Bocci
    Andrea Bocci
    2002-07-01

    path to fix as proposed

     
    Attachments