bug 277625 - Context menu Copy Email Address not unescaping, r+sr=bz, a=asa

This commit is contained in:
mconnor%myrealbox.com 2005-01-10 07:34:47 +00:00
parent ead07093d5
commit 438bb7b5a9

View File

@ -642,13 +642,12 @@ nsContextMenu.prototype = {
}
// Let's try to unescape it using a character set
// in case the address is not ASCII.
try {
var ownerDocument = new XPCNativeWrapper(this.target, "ownerDocument").ownerDocument;
var characterSet = new XPCNativeWrapper(ownerDocument, "characterSet").characterSet;
const textToSubURI = Components.classes["@mozilla.org/intl/texttosuburi;1"]
.getService(Components.interfaces.nsITextToSubURI);
addresses = textToSubURI.unEscapeNonAsciiURI(characterSet, addresses);
addresses = textToSubURI.unEscapeURIForUI(characterSet, addresses);
}
catch(ex) {
// Do nothing.