From 0cd285ca1d785cb2575d3a81ae35fd967b91df17 Mon Sep 17 00:00:00 2001 From: Robert Reinhard Date: Fri, 29 Mar 2013 10:37:48 -0700 Subject: [PATCH] Making the URL check also match mailto: links Using createLink with "mailto:" links was stripping them. --- src/dom/parse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dom/parse.js b/src/dom/parse.js index f7868f94..278503f7 100644 --- a/src/dom/parse.js +++ b/src/dom/parse.js @@ -372,7 +372,7 @@ wysihtml5.dom.parse = (function() { // ------------ attribute checks ------------ \\ var attributeCheckMethods = { url: (function() { - var REG_EXP = /^https?:\/\//i; + var REG_EXP = /^(https?:\/\/)|(mailto:)/i; return function(attributeValue) { if (!attributeValue || !attributeValue.match(REG_EXP)) { return null;