Modify the status bar link text so it shows either the ASCII encoded or IDN host, depending on the set option.
Default is to display the encoded version as this provides some security making phishing domains more obvious, and a lot of our frontends are unable to display the full range of UTF-8 characters on the status bar. Displaying the decoded address in the URL bar requires frontends to be updated (GTK and Amiga done already), and the same caveats apply.
This commit is contained in:
parent
dd38897a26
commit
53141c7089
|
@ -300,6 +300,7 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
|
|||
enum { ACTION_NONE, ACTION_SUBMIT, ACTION_GO } action = ACTION_NONE;
|
||||
const char *title = 0;
|
||||
nsurl *url = 0;
|
||||
char *idn_url = NULL;
|
||||
const char *target = 0;
|
||||
char status_buffer[200];
|
||||
const char *status = 0;
|
||||
|
@ -814,12 +815,22 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
|
|||
y - html_object_pos_y);
|
||||
}
|
||||
} else if (url) {
|
||||
if (nsoption_bool(display_decoded_idn) == true) {
|
||||
idn_url = nsurl_access_utf8(url);
|
||||
}
|
||||
|
||||
if (title) {
|
||||
snprintf(status_buffer, sizeof status_buffer, "%s: %s",
|
||||
nsurl_access(url), title);
|
||||
idn_url ? idn_url : nsurl_access(url), title);
|
||||
} else {
|
||||
snprintf(status_buffer, sizeof status_buffer, "%s",
|
||||
idn_url ? idn_url : nsurl_access(url));
|
||||
}
|
||||
|
||||
status = status_buffer;
|
||||
} else
|
||||
status = nsurl_access(url);
|
||||
|
||||
if (idn_url != NULL)
|
||||
free(idn_url);
|
||||
|
||||
pointer = get_pointer_shape(url_box, imagemap);
|
||||
|
||||
|
|
Loading…
Reference in New Issue