URL: <https://savannah.gnu.org/bugs/?68945>
Summary: wget -k -p without -E does not convert ? to %3F in
<img src="...">
Group: GNU Wget
Submitter: None
Submitted: Sun 22 Nov 2026 08:06:00 PM UTC
Category: Program Logic
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Unlocked
Release: trunk
Operating System: GNU/Linux
Reproducibility: Every Time
Fixed Release: None
Planned Release: None
Regression: None
Work Required: None
Patch Included: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sun 22 Nov 2026 08:06:00 PM UTC By: Anonymous
When I use -k -p without -E (--convert-links --page-requisites without
--adjust-extension), and the local image file names literally contain the
question mark `?`, the <img src> URLs contain ? instead of %3F, which makes
the images not render in the web browser.
Context is that I'm trying to download an article for offline viewing and I
ran some variants of the command that is in the section -p of the manpage (-E
-H -k -K -p http://).
# No images
wget -w 1 -N -H -k -K -p
'https://en.wikipedia.org/wiki/Base_rate_fallacy'
# No images
wget -w 1 -H -k -p
'https://en.wikipedia.org/wiki/Elevator_paradox'
# No images
wget -w 1 -H -k -K -p
'https://en.wikipedia.org/wiki/Ellsberg_paradox'
# OK, images appear
wget -w 1 -E -H -k -K -p
'https://en.wikipedia.org/wiki/Friendship_paradox'
# OK, images appear
wget -w 1 -E -H -k -p
"https://en.wikipedia.org/wiki/Simpson's_paradox"
I get the same results across wget 1.25.0 from Arch Linux, 1.25.0 from Debian
13, 1.21.3 from Debian 12, 1.21 from Debian 11.
I'm attaching wget_debug.txt from
wget -d \
-w 1 \
-H -k -p \
'https://en.wikipedia.org/wiki/Elevator_paradox' \
2>wget_debug.txt
For other users running into this, open Firefox, right-click the frame where
an image should be, click Inspect, double-click `src` in the selected HTML
node, change ? to %3F and press Enter.
In the Base rate fallacy example, do this on the first image at the top and
change
src="../../thumb.wikimedia.org/wikipedia/commons/thumb/2/20/Base_rate_fallacy_with_vaccines.svg/330px-Base_rate_fallacy_with_vaccines.svg.png?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail"
to
src="../../thumb.wikimedia.org/wikipedia/commons/thumb/2/20/Base_rate_fallacy_with_vaccines.svg/330px-Base_rate_fallacy_with_vaccines.svg.png%3Futm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail"
Now the image appears.
I know that the content of the attribute src reads like a local file path and
that the file name literally contains ?, but the reason I'm filing a ticket
here and not at the web browser is that this is unexpected (not mentioned in
the manpage for -E) and that HTML still wants src to be an URL
(`../../something` apparently being a path-relative-scheme-less-URL
<https://url.spec.whatwg.org/#relative-url-string>) which makes ? formally
disallowed.
_______________________________________________________
File Attachments:
Name: wget_debug.txt Size: 855KiB
<https://file.savannah.gnu.org/file/wget_debug.txt?file_id=59245>
AGPL NOTICE
These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-6c1b7454cc53148ab2171e0af896a238884b4be8.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68945>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
