Bug 1205050 - TEST-UNEXPECTED-FAIL | xpcshell-icaljs.ini:calendar/test/unit/test_bug1199942.js | xpcshell return code: 0;a+r=philipp
authormakemyday@gmx-topmail.de
Tue, 15 Sep 2015 23:00:08 +0200
changeset 22185 fcbf027771c2a1e87ed4064c09fe400b603e6c02
parent 22184 ac689553a1907d0dc716998029a55255512df14c
child 22186 d201ce27282ff297af34178231c4899152acb7d7
push id49
push usermakemyday@gmx-topmail.de
push dateWed, 16 Sep 2015 20:20:47 +0000
treeherdercomm-esr38@fcbf027771c2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1205050, 1199942
Bug 1205050 - TEST-UNEXPECTED-FAIL | xpcshell-icaljs.ini:calendar/test/unit/test_bug1199942.js | xpcshell return code: 0;a+r=philipp
calendar/base/modules/calUtils.jsm
--- a/calendar/base/modules/calUtils.jsm
+++ b/calendar/base/modules/calUtils.jsm
@@ -289,17 +289,17 @@ let cal = {
 
     /**
      * Prepends a mailto: prefix to an email address like string
      *
      * @param  {string}        the string to prepend the prefix if not already there
      * @return {string}        the string with prefix
      */
     prependMailTo: function(aId) {
-        return (aId.search(/^mailto:/i) == -1 && aId.contains("@")) ? "mailto:" + aId : aId;
+        return aId.replace(/^(?:mailto:)?(.*)@/i, "mailto:$1@");
     },
 
     /**
      * Removes an existing mailto: prefix from an attendee id
      *
      * @param  {string}       the string to remove the prefix from if any
      * @return {string}       the string without prefix
      */