зеркало из https://github.com/mozilla/gecko-dev.git
Changed to unescape the tab title with a charset if non ASCII,
bug 158171, r=caillon, sr=bzbarsky.
This commit is contained in:
Родитель
40063e379e
Коммит
21bd7b3226
|
@ -559,9 +559,23 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (title && title != "about:blank")
|
if (title && title != "about:blank") {
|
||||||
|
// At this point, we now have a URI.
|
||||||
|
// Let's try to unescape it using a character set
|
||||||
|
// in case the URI is not ASCII.
|
||||||
|
try {
|
||||||
|
var characterSet = Components.lookupMethod(browser.contentDocument, 'characterSet')
|
||||||
|
.call(browser.contentDocument);
|
||||||
|
const textToSubURI = Components.classes["@mozilla.org/intl/texttosuburi;1"]
|
||||||
|
.getService(Components.interfaces.nsITextToSubURI);
|
||||||
|
title = textToSubURI.unEscapeNonAsciiURI(characterSet, title);
|
||||||
|
}
|
||||||
|
catch(ex) {
|
||||||
|
// Do nothing.
|
||||||
|
}
|
||||||
|
|
||||||
crop = "center";
|
crop = "center";
|
||||||
else // Still no title? Fall back to our untitled string.
|
} else // Still no title? Fall back to our untitled string.
|
||||||
title = this.mStringBundle.getString("tabs.untitled");
|
title = this.mStringBundle.getString("tabs.untitled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче