mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-02 08:57:19 -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;
|
char *href;
|
||||||
|
|
||||||
href = get_url_val(a, "href", html_context->doc_cp);
|
href = get_url_val(a, "href", html_context->doc_cp);
|
||||||
|
|
||||||
if (href) {
|
if (href) {
|
||||||
char *target;
|
char *target;
|
||||||
|
char *href_converted = convert_string(renderer_context.convert_table, href, strlen(href),
|
||||||
|
html_context->options->cp, CSM_NONE, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
if (href_converted) {
|
||||||
mem_free_set(&elformat.link,
|
mem_free_set(&elformat.link,
|
||||||
join_urls(html_context->base_href,
|
join_urls(html_context->base_href, trim_chars(href_converted, ' ', 0)));
|
||||||
trim_chars(href, ' ', 0)));
|
mem_free(href_converted);
|
||||||
|
}
|
||||||
mem_free(href);
|
mem_free(href);
|
||||||
|
|
||||||
target = get_target(html_context->options, a);
|
target = get_target(html_context->options, a);
|
||||||
|
Loading…
Reference in New Issue
Block a user