I'm seeing an odd behavior, and I wonder if it is a regression in Safari 5's 
webkit, and if there is a workaround.

I have an HTML string which I have loaded up from a remote website, and 
modified slightly to include an image with a source of a local file:// URL.

Then I try to load it into my webview with -[WebFrame loadHTMLString:baseURL:]. 
I pass in the base URL so that the images with relative paths will show 
properly.

This works fine, except that my file:// image does not load!  It's not even 
requested, if I monitor the resource load delegate!

The markup seems fine, and it has definitely been parsed when I examine my 
WebView with the inspector.  Just, no request for the image.

If I try to load the HTML with a nil base URL, then my file://-URL-based image 
shows up just fine.


This seems like either like a regression -- I can't believe that a base URL 
would affect being able to load up a local URL.  Or is this actually as 
expected?

Any ideas on a workaround?  (I tried splicing in <base href=...> instead of the 
base URL; the problem is that the initial request becomes about:blank, so links 
to "#" sections don't work.  I guess I can put my local image up on the web...)


--
Dan Wood
Twitter: http://twitter.com/danwood
Karelia Software — Sandvox for the Mac
http://www.karelia.com/

It is time we steered by the stars and not by the lights of each passing ship - 
General Omar Bradley




_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help

Reply via email to