Should child frames have the base URL of the parent?

Maksim Orlovich mo85 at cornell.edu
Fri Nov 26 19:37:41 GMT 2010


Not in general, but only in case of javascript: and about:. Fix
committed in r1201110.

On 11/18/10, David Faure <faure at kde.org> wrote:
> Hello (Maksim?)
>
> Today a Joomla developer came to #khtml and I tested some things for him,
> and while doing that I found a bug: editing a webpage with an image didn't
> load the image, because the base URL was empty -- so with
> img src="images/foo.jpeg", it would try to load file:///images/foo.jpeg
> instead
> of loading it from the website.
>
> Testcase:
>   http://rouvenwessling.de/nokonk/index.php, login with toto/toto, follow
> link
> to Sample Sites, Australian Parks, note the nice lake, click on the Edit
> icon
> above it -> in the rich text editor that comes up (TinyMCE), the lake shows
> up
> as a broken icon.
>
> Or open this direct URL once you're logged in:
> http://rouvenwessling.de/nokonk/index.php?option=com_content&view=form&layout=edit&id=6&Itemid=243
>
> Investigation: a child frame is created for rendering the HTML, and that
> frame
> gets an empty "base URL" by default.
>
> My fix: setting the base URL of the parent frame, see attached patch. But I
> have no idea if this is the right way to do things, or if this might break
> countless websites with frames/iframes/objects.
>
> --
> David Faure, faure at kde.org, http://www.davidfaure.fr
> Sponsored by Nokia to work on KDE, incl. Konqueror
> (http://www.konqueror.org).
>




More information about the kfm-devel mailing list