bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #66430] --convert-links breaks HTML by decoding a percent-encoded s


From: anonymous
Subject: [bug #66430] --convert-links breaks HTML by decoding a percent-encoded single quote inside single quotes
Date: Fri, 8 Nov 2024 19:17:13 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?66430>

                 Summary: --convert-links breaks HTML by decoding a
percent-encoded single quote inside single quotes
                   Group: GNU Wget
               Submitter: None
               Submitted: Sat 09 Nov 2024 12:17:10 AM UTC
                Category: Program Logic
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name:
        Originator Email: greyocean@airmail.cc
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
        Operating System: None
         Reproducibility: Every Time
           Fixed Release: None
         Planned Release: None
              Regression: None
           Work Required: None
          Patch Included: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sat 09 Nov 2024 12:17:10 AM UTC By: Anonymous
wget 1.24.5
Consider HTML with following content:

... <a href='joe%27s_page.html'>Joe's page</a>. ..

When downloading this page and the one linked in href with --convert-links,
the above HTML gets converted to:

... <a href='joe's_page.html'>Joe's page</a> ...

Notice how %27 got decoded to a literal "'" inside an already single quoted
link, thus breaking the link.
A quick hack of src/convert.c:local_quote_string() to encode "'" back into %27
seems to fix local viewing for me.
However, i have no knowledge of wget's internals and don't know if this could
be considered a proper fix.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66430>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]