oasegips / sigil

Automatically exported from code.google.com/p/sigil
GNU General Public License v3.0
0 stars 0 forks source link

Relative url replaced by absolute "file" url. #1879

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Editing a page
2. Saving. 

What is the expected output? What do you see instead?
No change in the url

What version of the product are you using? On what operating system?

Since I'm on Mac OSX 10.7.5 I have to use 0.6.1 of Sigil (alas). 

Please provide any additional information below. 

I'm adding a background image to my pages with:

<body style="background-image:url('../Images/wall.jpg')">

However, sometimes when I save, the url is replaced by a (very long) absolute 
url to the actual file on my system.  'file:...../...jpg'. The url works in 
sigil and there is no reported error when checking. but from another device 
(ipad) it won't work, of course. 

When the url is NOT replaced everything is copacetic. 

It would be even nicer if the background defined in the stylesheet were 
recognized, but I haven't been successful with that. (alas^2). That may be an 
epub issue, of course. 

I wonder if this is related to the replacement of the DTD with an incorrect 
one. 

I've had other strange replacements also, such as adding meta tags that come 
from "somewhere". 

Apologies if this has been reported, but I couldn't find anything similar in 
searching the issue list. 

Original issue reported on code.google.com by bergin....@gmail.com on 2 Jan 2013 at 9:59

GoogleCodeExporter commented 9 years ago
I don't see this issue.  Meta tags are not usually added from somewhere - they 
usually come from your original file and they weren't initially noticed.

If you can provide an example EPUB that shows the problem it would help, 
otherwise this doesn't seem to be reproducible.

The background not showing is a Qt issue - fortunately it seems to work in the 
next version...

Original comment by daveheil...@gmail.com on 4 Jan 2013 at 8:50

GoogleCodeExporter commented 9 years ago
This is why I'm mystified. All the files were splits of existing files starting 
with the initial sigil provided xhtml file. None were imported. Even my css 
file was written by hand in sigil. I edit both in code and rendered view. All 
the splits were done in rendered view at the end of the visible elements - i.e. 
move cursor to the end of the file and then split, rename, edit... The actual 
xhtml is very simple, actually. 

There is also the issue of the problem in the title of this issue. Replacing a 
relative (../Images..) url with an absolute one. 

It is intermittent. I can't release the file I'm building (even privately), but 
will try to build another that replicates it. I'll let you know when I learn 
more.

Original comment by bergin....@gmail.com on 4 Jan 2013 at 10:12

GoogleCodeExporter commented 9 years ago
Unable to reproduce links changing, so closing.  But if you can provide an epub 
with steps we'll look at it.

Original comment by daveheil...@gmail.com on 17 Jan 2013 at 5:24

GoogleCodeExporter commented 9 years ago
Sorry, I don't have a consistent path to the problem. It happens quite a lot, 
however. 

Joe

Original comment by bergin....@gmail.com on 17 Jan 2013 at 7:22

GoogleCodeExporter commented 9 years ago
You have to import a copy of the image into the image folder in your sigil epub 
project then use your url as "../Image/wall.jpg/"

Original comment by jonathan...@gmail.com on 22 Jun 2013 at 2:40