X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhtml-url.c;h=1bb44b467b27ea57ca9a89185f3c63a9fcf8d4d1;hp=bb2b20e316b3db9896bee39ee1c4df84830a5435;hb=320cfdcb658e8d6556ae9dfd902c2db1db866a6b;hpb=6a2d67b5836a6f1b9c989968a5392ff3511bc1f9 diff --git a/src/html-url.c b/src/html-url.c index bb2b20e3..1bb44b46 100644 --- a/src/html-url.c +++ b/src/html-url.c @@ -284,6 +284,10 @@ append_url (const char *link_uri, int position, int size, const char *base = ctx->base ? ctx->base : ctx->parent_base; struct url *url; + struct iri *iri = iri_new (); + set_uri_encoding (iri, opt.locale, true); + iri->utf8_encode = true; + if (!base) { DEBUGP (("%s: no base, merge will use \"%s\".\n", @@ -301,7 +305,7 @@ append_url (const char *link_uri, int position, int size, return NULL; } - url = url_parse (link_uri, NULL, NULL, false); + url = url_parse (link_uri, NULL, iri, false); if (!url) { DEBUGP (("%s: link \"%s\" doesn't parse.\n", @@ -323,7 +327,7 @@ append_url (const char *link_uri, int position, int size, quote_n (2, link_uri), quotearg_n_style (3, escape_quoting_style, complete_uri))); - url = url_parse (complete_uri, NULL, NULL, false); + url = url_parse (complete_uri, NULL, iri, false); if (!url) { DEBUGP (("%s: merged link \"%s\" doesn't parse.\n", @@ -334,6 +338,8 @@ append_url (const char *link_uri, int position, int size, xfree (complete_uri); } + iri_free (iri); + DEBUGP (("appending %s to urlpos.\n", quote (url->url))); newel = xnew0 (struct urlpos);