bugGNU Wget - Bugs: bug #30501, wget does not convert (-k)...

 
 

bug #30501: wget does not convert (-k) embedded css url() links to relative local paths

Submitted by:  None
Submitted on:  Tue 20 Jul 2010 06:45:50 PM UTC  
 
Category: Program LogicSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: Giuseppe Scrivano <gscrivano>
Originator Name: JGOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 1.12
Operating System: GNU/LinuxReproducibility: Every Time
Fixed Release: NonePlanned Release: None
Regression: NoneWork Required: None
Patch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 30 Jul 2010 09:07:58 AM UTC, comment #5:

yes, the patch fixes the issue

Juliusz Gonera <jg271>
Thu 29 Jul 2010 10:53:59 PM UTC, comment #4:

I am going to commit this patch. It should fix the problem you have reported.

Can you test if it works for you?

(file #21103)

Giuseppe Scrivano <gscrivano>
Project AdministratorIn charge of this item.
Thu 29 Jul 2010 01:18:02 PM UTC, comment #3:

The bug is still valid, see the original submission, have you tried to reproduce?

Juliusz Gonera <jg271>
Thu 29 Jul 2010 11:07:35 AM UTC, comment #2:

instead of:

wget -e robots=off -k -p "http://sourceforge.net/register/"

please use:

wget -e robots=off -H -k -p "http://sourceforge.net/register/"

In this way wget will follow links on other hosts as well.

Unfortunately wget doesn't handle JavaScript, so any resource specified as JavaScript is not handled.

I am going to close this bug, if something is still not working, re-open it.

Giuseppe Scrivano <gscrivano>
Project AdministratorIn charge of this item.
Sun 25 Jul 2010 01:12:13 AM UTC, comment #1:

This can also happen with <link> links to CSS,
reproduce with wget 1.12 (Debian testing):

wget -e robots=off -k -p "http://sourceforge.net/register/"

You will notice that in sourceforge.net/register/index.html,
two important stylesheets similar to these are linked:

<link rel="stylesheet" type="text/css" href="http://static.sourceforge.net/css/develop/style.php?secure=0&amp;1278807003" media="all" />

<link rel="stylesheet" type="text/css" href="http://static.sourceforge.net/css/develop/global.php?secure=0&amp;1278807003" media="all" />

These stylesheets are not downloaded by wget and the links are not changed by -k parameter, so when you cut off the internet connection, the downloaded page looks horrible.

I think this does not only happen because of the PHP stuff, it happens with several sites. Sometimes when mirroring, the stylesheet is downloaded (maybe because of some other page) but the links to it are not always converted. Links not being converted do not have to start with "http://...", I have also seen "/css/style.css" instead of "css/style.css".

Anonymouse <anonymouse>
Tue 20 Jul 2010 06:45:50 PM UTC, original submission:

Steps to reproduce:

1. wget -E -p -k -nH -nd -H -P ./ http://en.wikipedia.org/wiki/Main_Page
2. Notice the file 'Wikipedia-logo-v2-en.png' - the wikipedia logo file is properly downloaded but the link to it in the document isn't properly converted (to the local path to the file (-k)), it will still point to http://upload.wikimedia.org/wikipedia/commons/d/d6/Wikipedia-logo-v2-en.png

Part of HTML code responsible for rendering the image:
<a style="background-image: url(http://upload.wikimedia.org/wikipedia/commons/d/d6/Wikipedia-logo-v2-en.png);" href="/wiki/Main_Page" title="Visit the main page"></a>

Expected behaviour:
The above background-image url should point to the downloaded, local version of the file.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #21103:  fix_css_links.patch added by gscrivano (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jg271 (Posted a comment)
  • -unavailable- added by gscrivano (Posted a comment)
  • -unavailable- added by anonymouse (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 30 Jul 2010 09:31:25 AM UTCgscrivanoStatusWorks For Me=>Fixed
    Thu 29 Jul 2010 10:53:59 PM UTCgscrivanoAttached File-=>Added fix_css_links.patch, #21103
    Thu 29 Jul 2010 11:07:35 AM UTCgscrivanoStatusNone=>Works For Me
      Assigned toNone=>gscrivano
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1