rem: attachment = Components.classes["@mozilla.org/messengercompose/attachment;1"] .createInstance(Components.interfaces.nsIMsgAttachment); attachment.url = rawData; attachment.name = prettyName; AddAttachment(attachment); 
add: var isValid = true; if (item.flavour.contentType == "text/x-moz-url") {        try { var scheme = gIOService.extractScheme(rawData);  if (scheme == "mailto") isValid = false; } catch (ex) { isValid = false; } }  if (isValid) { attachment = Components.classes["@mozilla.org/messengercompose/attachment;1"] .createInstance(Components.interfaces.nsIMsgAttachment); attachment.url = rawData; attachment.name = prettyName; AddAttachment(attachment); } 
context:   onDrop: function (aEvent, aData, aDragSession)    {      var dataList = aData.dataList;      var dataListLength = dataList.length;      var errorTitle;      var attachment;      var errorMsg;      for (var i = 0; i < dataListLength; i++)       {        var item = dataList[i].first;        var prettyName;        var rawData = item.data;                if (item.flavour.contentType == "text/x-moz-url" ||            item.flavour.contentType == "text/x-moz-message" ||            item.flavour.contentType == "application/x-moz-file")        {          if (item.flavour.contentType == "application/x-moz-file")          {            var ioService = Components.classes["@mozilla.org/network/io-service;1"]                            .getService(Components.interfaces.nsIIOService);            var fileHandler = ioService.getProtocolHandler("file")                              .QueryInterface(Components.interfaces.nsIFileProtocolHandler);            rawData = fileHandler.getURLSpecFromFile(rawData);          }          else          {            var separator = rawData.indexOf("\n");            if (separator != -1)             {              prettyName = rawData.substr(separator+1);              rawData = rawData.substr(0,separator);            }          }          if (DuplicateFileCheck(rawData))           {            dump("Error, attaching the same item twice\n");          }          else           {            attachment = Components.classes["@mozilla.org/messengercompose/attachment;1"]                         .createInstance(Components.interfaces.nsIMsgAttachment);            attachment.url = rawData;            attachment.name = prettyName;            AddAttachment(attachment);          }        }      }    },
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/216ddbecfe6fc30859a651c0137b63f247831083/MsgComposeCommands.js/buggy/mailnews/compose/resources/content/MsgComposeCommands.js