Sigil-Ebook / flightcrew

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

malformed link reported as unused resource #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. have a hyperlink like <a href="www.website.com">Website</a> forgetting the 
http in a page in the ePub..
2. FlightCrew will report it as a resource in OEBPS/Text/www.website.com 
reachable but not present in OPF.
3. adding the http part in the link in epub will give no problems found 

What is the expected output? What do you see instead?
'No problems found' or 'Malformed hyperlink' in file.xhtml lineXX

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

Read the ReportingIssues wiki page before submitting! In 99.99% of the
cases, you need to attach a minimal epub file to this issue so please do
so.

Original issue reported on code.google.com by albar...@gmail.com on 12 Nov 2010 at 3:05

GoogleCodeExporter commented 9 years ago
Actually FlightCrew is correct here. If you reference a website without the 
"http://" part, you're referencing a local file. In your example, you're 
referencing a file called "www.website.com" in the folder of the XHTML file. 
That file could realistically exist. Since it doesn't, FC reports an error.

The fact that it is a malformed hyperlink is altogether irrelevant. "bit.ly" 
would be a malformed link, but that's another file that could actually exist. 
Bottom line, there is no way in which FC could know that what you're 
referencing is not a local file but is a malformed link, since without the 
scheme you have a relative URL. It can only report it as a missing file, since 
that's what the specs say that a relative URL is supposed to be interpreted as.

Original comment by Strahinja.Markovic@gmail.com on 12 Nov 2010 at 1:18

GoogleCodeExporter commented 9 years ago
Ah ok. Then its a bit hard to differentiate between a actual file present in 
the ePub but not linked to the content (fe an unused image) and a link in the 
content to a file that is not present in the ePUB. (If you know what I mean)
Thankf for the clarification.

Original comment by albar...@gmail.com on 12 Nov 2010 at 6:19