Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add network.standard-url.escape-utf8 preference #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions modules/content-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ define_current_buffer_hook("current_content_buffer_location_change_hook", "conte
define_current_buffer_hook("current_content_buffer_status_change_hook", "content_buffer_status_change_hook");
define_current_buffer_hook("current_content_buffer_focus_change_hook", "content_buffer_focus_change_hook");

function maybe_decode_uri (uri) {
return get_pref("network.standard-url.escape-utf8") ? uri : decodeURIComponent(uri);
}

function content_buffer_modality (buffer) {
var elem = buffer.focused_element;
Expand Down Expand Up @@ -184,7 +187,7 @@ content_buffer.prototype = {
},

get title () { return this.browser.contentTitle; },
get description () { return this.display_uri_string; },
get description () { return maybe_decode_uri(this.display_uri_string); },

load: function (load_spec) {
apply_load_spec(this, load_spec);
Expand Down Expand Up @@ -422,7 +425,7 @@ minibuffer.prototype.read_url = function () {
*/
function overlink_update_status (buffer, node) {
if (node && node.href.length > 0)
buffer.window.minibuffer.show("Link: " + node.href);
buffer.window.minibuffer.show("Link: " + maybe_decode_uri(node.href));
else
buffer.window.minibuffer.clear();
}
Expand Down
2 changes: 1 addition & 1 deletion modules/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ history_completions.prototype = {
toString: function () "#<history_completions>",
root: null,
destroy: function () { this.root.containerOpen = false; },
get_string: function (i) this.root.getChild(i).uri,
get_string: function (i) maybe_decode_uri(this.root.getChild(i).uri),
get_description: function (i) this.root.getChild(i).title,
get_value: function (i) this.root.getChild(i),
};
Expand Down