Changed to unescape the tab title with a charset if non ASCII,
bug 158171, r=caillon, sr=bzbarsky. git-svn-id: svn://10.0.0.236/trunk@131492 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
b079b3d1ba
commit
2675d24379
@ -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";
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user