onload event listeners attached to NodeImpls which fail to be attached

Andrew Coles andrew_coles at yahoo.co.uk
Fri May 20 14:08:40 BST 2005


I've come across a bug in konqueror's parser triggered by mangled HTML.  The 
root of the problem is that when KHTMLParser::parseToken parses a tag, in the 
process of setting its attributes it registers onload events to be triggered.  
However, if insertNode fails lower down, the node is deleted but the event 
handler is left registered referring to the node.

I don't know what would be the best way to solve this due to my inexperience 
with the KHTML engine; I hope someone knows a neat way of dealing with it!

Thanks,

Andrew




More information about the kfm-devel mailing list