The following example shows how the parser in htmlparse gets confused by
the JavaScript expression i<w..., incorrectly recognizing it as a tag.
<HTML>
<HEAD>
<TITLE>Demonstrate Bug</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function resetTheForm()
{
var i;
// Make sure the forms object exists
if(window.document.forms)
{
// Reset each form
for(i=0; i<window.document.forms.length; i++)
window.document.forms[i].reset();
}
}
</SCRIPT>
</HEAD>
<BODY>
<P>Nothing interesting here; move along.</P>
</BODY>
</HTML>
(Running it through the debugCallback will show the incorrect parsing.
Andreas Kupries
htmlparse
None
Public
|
Date: 2008-02-15 21:19
|
|
Date: 2006-12-02 03:27
|
|
Date: 2006-12-01 19:56
|
|
Date: 2006-12-01 19:35
|
|
Date: 2006-12-01 19:23
|
|
Date: 2006-12-01 18:19
|
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use