Issue 88277 - Graphics are not shown from a imported html file
Summary: Graphics are not shown from a imported html file
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: Writer
Classification: Application
Component: viewing (show other issues)
Version: OOo 2.4.0
Hardware: PC (x86_64) Linux, all
: P4 Trivial (vote)
Target Milestone: ---
Assignee: eric.savary
QA Contact: issues@sw
URL:
Keywords: needmoreinfo
Depends on:
Blocks:
 
Reported: 2008-04-14 21:15 UTC by marcelm
Modified: 2008-04-17 11:33 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
html file (1.89 KB, text/plain)
2008-04-15 18:49 UTC, marcelm
no flags Details
sample graphics file (227 bytes, text/plain)
2008-04-15 18:50 UTC, marcelm
no flags Details
this document with base tag loads OK (1.44 KB, text/plain)
2008-04-16 09:45 UTC, mike_hall
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description marcelm 2008-04-14 21:15:40 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.
Comment 1 michael.ruess 2008-04-15 07:02:20 UTC
Reassigned to ES.
Comment 2 eric.savary 2008-04-15 12:05:01 UTC
Please attach a sample document.
Comment 3 marcelm 2008-04-15 18:49:03 UTC
Created attachment 52833 [details]
html file
Comment 4 marcelm 2008-04-15 18:50:42 UTC
Created attachment 52834 [details]
sample graphics file
Comment 5 marcelm 2008-04-15 18:54:06 UTC
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.
Comment 6 mike_hall 2008-04-16 09:43:39 UTC
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. 
Comment 7 mike_hall 2008-04-16 09:45:41 UTC
Created attachment 52847 [details]
this document with base tag loads OK
Comment 8 mike_hall 2008-04-16 09:46:17 UTC
added self as cc
Comment 9 marcelm 2008-04-16 19:45:58 UTC
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 


Comment 10 mike_hall 2008-04-17 07:15:27 UTC
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.  
Comment 11 mike_hall 2008-04-17 07:31:07 UTC
... 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.)
Comment 12 eric.savary 2008-04-17 11:33:21 UTC
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.