This is the entire content of my CancelLoad event handler, if it helps:
// Called when the content of the HTMLViewer is about to be replaced. If this is due to loading
// an html string into the control, then it seems the URL will be "about:blank". If it happens
// due to the user clicking on a link in the HTMLViewer, we want to show that one. Any links in
// the control will either have no "target" attribute, or it will have been be changed to "_self".
// This will force all clicked links to trigger this event, which then uses GotoURL() to display
// the linked page in the user's browser, rather than here.
// Under Win7 the page loaded from code goes via a temporary file. When an external link is
// clicked, the URL has the normal form, but also another event occurs with the "about:blank" URL.
// For macOS, mailto: is handled by an AppleEvent triggered by the GotoURL. For Win/Lin, it is
// handled via the mailtoWSserver, so nothing should be done here.
if (URL="about:blank" or URL.BeginsWith("file://")=True or URL.BeginsWith("c:\Users\")=True) then Return False
#if (TargetMacOS=False) then
if (URL.BeginsWith("mailto:")=True) then Return True // The HTMLViewer should ignore this request