From d96ecc9c3975a253f9956dc1860a2d8c84534ca3 Mon Sep 17 00:00:00 2001 From: Jeff Pelton Date: Mon, 5 Jan 2015 22:49:31 -0800 Subject: [PATCH] allow mailto: to exist elsewhere in the CN, for instance after a name like the examples John:mailto:my@email.com --- lib/types.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/types.js b/lib/types.js index 2af4fd7..54811c7 100644 --- a/lib/types.js +++ b/lib/types.js @@ -52,7 +52,7 @@ var _types = { 'CAL-ADDRESS': { format: function(value) { var v = value.toString(); - if(v.lastIndexOf("mailto:") != 0) + if(v.indexOf("mailto:") === -1) v = "mailto:"+v; return v; }