Apache OpenOffice (AOO) Bugzilla – Issue 88277
Graphics are not shown from a imported html file
Last modified: 2008-04-17 11:33:22 UTC
Opening a html file (e.g oowriter myfile.html) with graphics results in not shown graphics. firefox and ephihany show the graphics without any problems but oowriter shows only the alternative text and no graphics. The graphics are in the same folder as the html file to open. I looked in the html file and found the issue: <base href="./" /> If I remove this line everything is fine. I'm not an expert in the html tags but for me this looks like a bug.
Reassigned to ES.
Please attach a sample document.
Created attachment 52833 [details] html file
Created attachment 52834 [details] sample graphics file
download both files and store them both in the same directory. Open the html file with oowriter and you see that the graphic is not loaded. Now open the html file with a text editor and remove the <base href...> tag. Open the file again. Graphic is now shown.
There does seem to be a problem with this document. If you make any change, save, close and reload, the problem goes away. However, the problem is not simply that of removing the base tag (though this is the effect of the edit and save). Other html documents with the same base tag load fine. I will add an example, using the same graphic. Please can you provide the simplest possible example of an html file which shows this problem so the cause can be more easily determined.
Created attachment 52847 [details] this document with base tag loads OK
added self as cc
Ok I tried mikes html and found this: The command <base href="./" /> fails to load the graphics But the command <base './'> works. The graphics are shown. The quotes are not the issue it's the attribute href Explanation: http://www.w3schools.com/TAGS/tag_base.asp If I got it right the command <base './'> is undefined
Ah! Many apologies - must have been having a bad day. My <base... tag is nonsense. The problem is that a base tag needs a full URL, it's not legal to do what we were trying to do. If you replace the base tag with (eg) <base href="http://www.onepoyle.net/images/"> then everything works. Things are slightly confused by what Writer does. If you make any change to a document, it adds the base URL to all img tags and removes the base tag. It was doing that to all our examples as well, but as there wasn't a valid URL in any of the base tags we supplied, there was nothing to add, and as the images were in the same directory, that fixed the problem. Apologies for misleading you.
... I think the fact that browsers like Firefox accept the relative <base... tag and do work is a different issue. They are just being kind to you. If you want Writer to work the same way, that would need the creation of an enhancement issue. Although on the face of it not an unreasonable request, there might well be opposition to making Writer support non-legal HTML. (That's if I have understood it correctly and the relative tag is not legal.)
And an enhancement will not bring much beause unfortunately, we have no ressource available to fix or improve the HTML component, so that we only can fix crashes and huge regressions. Thus, closing.