Crash on null URL attribute value

The invalid HTML below causes tidy to crash because of
a null URL attribute value.  The problem is in CheckUrl, where
attval->value == null.

I just added a check like this to Java tidy to avoid a
NullPointerException:

            if (lexer.configuration.FixBackslash)
            {
                if (attval.value != null) // prevents crash
                    attval.value = attval.value.replace('\\','/');
            }


Andy Quick

--------- test case ---------------------
<HEAD>
<TITLE> Computer Engineering Research Group at the University of Toronto
</TITLE>
</HEAD>
<BODY>
<H3>Welcome to the Computer Engineering Research Group</H3>
<a href "eecg.map">
</BODY>
</HTML>

Received on Saturday, 17 July 1999 14:54:03 UTC