mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-06 23:44:43 -04:00
[link] Convert href for anchor to terminal codepage, usually utf-8. Refs #221
This commit is contained in:
parent
e890b07584
commit
4a3fa85ee7
@ -54,13 +54,17 @@ html_a(struct html_context *html_context, char *a,
|
||||
char *href;
|
||||
|
||||
href = get_url_val(a, "href", html_context->doc_cp);
|
||||
|
||||
if (href) {
|
||||
char *target;
|
||||
char *href_converted = convert_string(renderer_context.convert_table, href, strlen(href),
|
||||
html_context->options->cp, CSM_NONE, NULL, NULL, NULL);
|
||||
|
||||
mem_free_set(&elformat.link,
|
||||
join_urls(html_context->base_href,
|
||||
trim_chars(href, ' ', 0)));
|
||||
|
||||
if (href_converted) {
|
||||
mem_free_set(&elformat.link,
|
||||
join_urls(html_context->base_href, trim_chars(href_converted, ' ', 0)));
|
||||
mem_free(href_converted);
|
||||
}
|
||||
mem_free(href);
|
||||
|
||||
target = get_target(html_context->options, a);
|
||||
|
Loading…
Reference in New Issue
Block a user