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 Architecture Severity:  3 - Normal
Priority:  5 - Normal Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  1.12 Operating System:  GNU/Linux
Reproducibility:  Every Time Fixed Release:  None
Planned Release:  None Regression:  None
Work Required:  None Patch 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.

Example:

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

Given:

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

We get:

<html>
<head>
</head>
<body>
<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>
</body>
</html>

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 Files:
   
   
Comment:
   

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
  • -email is unavailable- added by zeg (Submitted the item)
  • -email is unavailable- added by zeg
  •  

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-03-24 zeg Attached 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.3