bugGNU Wget - Bugs: bug #50514, Convert Links touching embedded...

 
 

bug #50514: Convert Links touching embedded Javascript

Submitter:  Ages Ayemtwo <ages2500>
Submitted:  Sat 11 Mar 2017 07:34:12 PM UTC
   
 
Category:  Program Logic Severity:  3 - Normal
Priority:  5 - Normal Status:  Duplicate
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  1.18 Operating System:  GNU/Linux
Reproducibility:  Every Time Fixed Release:  None
Planned Release:  None Regression:  No
Work Required:  None Patch Included:  No
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 13 Mar 2017 09:13:55 AM UTC, comment #1: 

Duplicate of #45796

This is a good starter for Wget newbies:
Should be easily fixed in src/html-url.c
Removing all occurrences of TAG_SCRIPT should do it.
A test case would be appreciated.

Wget2 has a test case for skipping <script> contents.

Tim Ruehsen <rockdaboot>
Group administrator
Sat 11 Mar 2017 07:34:12 PM UTC, original submission:  

The convert links process, and maybe recursive retrieval process are touching embedded javascript code and mangling the code up a bit. Historically, I believe wget stayed away from touching javascript.

I attempt to grab the following page using:


wget -rkE -l inf -P wget_test -D dimensionality.com http://www.dimensionality.com/freebeeexamples/freebieexample1-javascript.html


The original source code includes the following line:


document.write("<img src=\"rw1");


After wget converts links, the line reads as:


document.write("<img src="http://www.dimensionality.com/freebeeexamples/\&quot;rw1&quot;);"


Ideally this line should be left as is, untouched.

Tested on wget v1.16 custom compiled from savanna source, on GNU/Linux Debian 7, and package install of wget v1.18 on Cygwin.

Ages Ayemtwo <ages2500>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rockdaboot (Posted a comment)
  • -email is unavailable- added by ages2500 (Submitted the item)
  •  

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-03-13 rockdaboot StatusNone Duplicate

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code