From 7e5861a0e88622b62636308dc80e91ca0b414083 Mon Sep 17 00:00:00 2001 From: Aleem Bawany Date: Tue, 16 Apr 2013 21:47:01 +0500 Subject: [PATCH] Allow mailto: links in link input box --- Markdown.Editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Markdown.Editor.js b/Markdown.Editor.js index d229fcd..460b8f1 100644 --- a/Markdown.Editor.js +++ b/Markdown.Editor.js @@ -1007,7 +1007,7 @@ else { // Fixes common pasting errors. text = text.replace(/^http:\/\/(https?|ftp):\/\//, '$1://'); - if (!/^(?:https?|ftp):\/\//.test(text)) + if (!/^(?:https?:\/\/|ftp:\/\/|mailto:)/.test(text)) text = 'http://' + text; }