View Single Post
Old 01-15-2010, 12:27 AM   #9
elvenic
Enthusiast
elvenic 's shirt has a full set of merit badges.elvenic 's shirt has a full set of merit badges.elvenic 's shirt has a full set of merit badges.elvenic 's shirt has a full set of merit badges.elvenic 's shirt has a full set of merit badges.elvenic 's shirt has a full set of merit badges.elvenic 's shirt has a full set of merit badges.elvenic 's shirt has a full set of merit badges.elvenic 's shirt has a full set of merit badges.elvenic 's shirt has a full set of merit badges.elvenic 's shirt has a full set of merit badges.
 
Posts: 31
Karma: 16610
Join Date: Dec 2009
Location: San Jose, CA, USA
Device: Kindle PW, Kobo Glo
Unfortunately, that's not all of it.

I added more download feeds to the recipe that I was playing with, trying to confirm that we have found the source of the bug. I found a img with empty src - there was only one in all download, and removed this line. Then I build the pub (now it has 250 pages) and downloaded it to the Sony device.

The page with the image that I removed shown OK.

But on the next page Sony froze.

The next page contained several images that were setup as a background images with URLs provided in a stylesheet file, and in the stylesheet file the URLs of these images were pointing to the real web addresses of the Globe and Mail servers.

For example, the index.html file in the article_4 directory contains following link:

Code:
<a href="http://www.theglobeandmail.com/video/teen-girl-violence-on-rise/article1430931/?view=picks" class="calibre47">Teen girl violence on rise</a>
(notice class="calibre47" attribute).

The stylesheet file, ../..stylesheet.css, contains following regarding class 'calibre47':

Code:
.calibre47 {
    background-image: url(http://beta.images.theglobeandmail.com/archive/00433/girl_fight_poll__433794gm-d.jpg)
    }
As you can see, the URL points to the "beta.images.theglobeandmail.com", that Sony PRS-600 can't access because it does not have internet connectivity.

I'm not sure how Calibre processes CSS, but may be it would be possible to filter out all external URLs from it when downloading the feed?

Would it be possible to achieve this by adding some code to the recipe? Any advice?
elvenic is offline   Reply With Quote