bugGNU Wget - Bugs: bug #29322, --convert-links and url() or url( ...


bug #29322: --convert-links and url() or url( ) produces wrong output

Submitted by:  Fernando Gutiérrez <zeg>
Submitted on:  Wed 24 Mar 2010 09:42:42 AM UTC  
Category: Code ArchitectureSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open
Release: 1.12Operating System: GNU/Linux
Reproducibility: Every TimeFixed Release: None
Planned Release: NoneRegression: None
Work Required: NonePatch Included: Yes

Add a New Comment(Rich Markup)

You are not logged in

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


Wed 24 Mar 2010 08:00:50 PM UTC, comment #1:

Do not confuse with bug #29279

Fernando Gutiérrez <zeg>
Wed 24 Mar 2010 09:42:42 AM UTC, original submission:

If using --conver-links and there is a style attribute that contains things like background-image: url(''); or background-image: url(); or background-image: url(' '); the produced webpage will be wrong.

That means, an empty url(), or with only spaces between the brackets, wrong output is produced. If there are spaces, they are changed to numbers and appended to the base url
If it's empty, the name of the webpage is used. They should be left untouched.


With the command: wget --convert-links http://pastehtml.com/view/5txtgoy.html


<a href="foot.htm" style="background-image: url('');">text</a>
<a href="foot.htm" style="background-image: url(' ');" >text</a>

We get:

<a href="http://pastehtml.com/view/foot.htm" style="background-image: url('5txtgoy.html');">text</a>
<a href="http://pastehtml.com/view/foot.htm" style="background-image: url('http://pastehtml.com/view/&#32;&#32;');" >text</a>

However, these style attributes shouldn't have been changed.

Fernando Gutiérrez <zeg>


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

Attach File(s):

Attached Files
file #20011:  log.txt added by zeg (3KiB - text/plain - Patch for version 1.12)
file #20012:  css-url.c.patch added by zeg (1KiB - application/octet-stream - Patch for version 1.12)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by zeg (Submitted the item)
  • -unavailable- added by zeg

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



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 24 Mar 2010 09:42:42 AM UTCzegAttached File-=>Added log.txt, #20011
      Attached File-=>Added css-url.c.patch, #20012
      Carbon-Copy-=>Added zeg

    Back to the top

    Powered by Savane 3.1-cleanup1