X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhtml-url.c;h=3c6c9b924c9a3c9a22648ce0e4a59880cde1c824;hp=bb2b20e316b3db9896bee39ee1c4df84830a5435;hb=38a7829dcb4eb5dba28dbf0f05c6a80fea9217f8;hpb=6a2d67b5836a6f1b9c989968a5392ff3511bc1f9
diff --git a/src/html-url.c b/src/html-url.c
index bb2b20e3..3c6c9b92 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);
@@ -466,7 +472,7 @@ tag_find_urls (int tagid, struct taginfo *tag, struct map_context *ctx)
/* Handle the BASE tag, for