зеркало из https://github.com/mozilla/pjs.git
bug 310696 suppress "view-source:" scheme in title, r=mconnor, sr=neil.parkwaycc
This commit is contained in:
Родитель
8299135ac7
Коммит
c7dd2dc96c
|
@ -583,12 +583,13 @@
|
|||
// If location bar is hidden and the URL type supports a host,
|
||||
// add the scheme and host to the title to prevent spoofing.
|
||||
// XXX https://bugzilla.mozilla.org/show_bug.cgi?id=22183#c239
|
||||
// (only for schemes that support a host)
|
||||
try {
|
||||
if (docElement.getAttribute("chromehidden").indexOf("location") != -1) {
|
||||
var host = this.mURIFixup.createExposableURI(
|
||||
this.mCurrentBrowser.currentURI).prePath;
|
||||
if (host)
|
||||
newTitle = host + sep + newTitle;
|
||||
var uri = this.mURIFixup.createExposableURI(
|
||||
this.mCurrentBrowser.currentURI);
|
||||
if (uri.host)
|
||||
newTitle = uri.prePath + sep + newTitle;
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче