]> sjero.net Git - wget/blobdiff - src/url.c
iri: Fix parsing of some URLs contained in HTML documents
[wget] / src / url.c
index bf9d6971de49e52f75762aa7a2c4d174a7eb41c1..f554432c081280cc56cade20ddc98d6f28ec07a1 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -701,7 +701,10 @@ url_parse (const char *url, int *error, struct iri *iri, bool percent_encode)
       if (!iri->utf8_encode)
         new_url = NULL;
       else
-        iri->orig_url = xstrdup (url);
+        {
+          iri->orig_url = xstrdup (url);
+          percent_encode = true;
+        }
     }
 
   /* XXX XXX Could that change introduce (security) bugs ???  XXX XXX*/