Bug 730629 - Hide http:// and single trailing slashes when displaying hyperlink target URLs. r=gavin ui-r=limi

This commit is contained in:
Dão Gottwald 2012-03-14 13:20:03 +01:00
parent 3d7fd59603
commit 6ce1f64eda

View File

@ -4497,8 +4497,13 @@ var XULBrowserWindow = {
setOverLink: function (url, anchorElt) {
// Encode bidirectional formatting characters.
// (RFC 3987 sections 3.2 and 4.1 paragraph 6)
this.overLink = url.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
encodeURIComponent);
url = url.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
encodeURIComponent);
if (gURLBar && gURLBar._mayTrimURLs /* corresponds to browser.urlbar.trimURLs */)
url = trimURL(url);
this.overLink = url;
LinkTargetDisplay.update();
},