W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 1999

Crash on null URL attribute value

From: Andy Quick <ac.quick@sympatico.ca>
Date: Sat, 17 Jul 1999 14:53:12 -0400
Message-ID: <001301bed085$9f7008e0$08fbacce@quick>
To: <html-tidy@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:42 GMT