Should child frames have the base URL of the parent?
David Faure
faure at kde.org
Thu Nov 18 11:20:51 GMT 2010
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).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: khtml_part_base_url.diff
Type: text/x-patch
Size: 634 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20101118/bf12a7f1/attachment.bin>
More information about the kfm-devel
mailing list