From bb4e48bf50a79632ee6d4fd84a0ad8813b70b2c0 Mon Sep 17 00:00:00 2001 From: Fabian Becker Date: Thu, 6 Feb 2014 15:29:22 +0000 Subject: [PATCH] Removed mailto auto-linking. fixes #1617 - Removed test - Removed auto-linking from showdown gfm extension --- core/shared/vendor/showdown/extensions/github.js | 5 ----- core/test/unit/client_showdown_int_spec.js | 7 ------- core/test/unit/shared_gfm_spec.js | 7 ------- 3 files changed, 19 deletions(-) diff --git a/core/shared/vendor/showdown/extensions/github.js b/core/shared/vendor/showdown/extensions/github.js index d11e2c04dd..150a2f99e1 100644 --- a/core/shared/vendor/showdown/extensions/github.js +++ b/core/shared/vendor/showdown/extensions/github.js @@ -115,11 +115,6 @@ return lookBehind ? wholeMatch : "" + wholeMatch + ""; }); - // match email - text = text.replace(/[a-z0-9_\-+=.]+@[a-z0-9\-]+(\.[a-z0-9-]+)+/gmi, function (wholeMatch) { - return "" + wholeMatch + ""; - }); - // replace extractions text = text.replace(/\{gfm-js-extract-pre-([0-9]+)\}/gm, function (x, y) { return preExtractions[y]; diff --git a/core/test/unit/client_showdown_int_spec.js b/core/test/unit/client_showdown_int_spec.js index ebaf1ba5ce..0bcdc81c69 100644 --- a/core/test/unit/client_showdown_int_spec.js +++ b/core/test/unit/client_showdown_int_spec.js @@ -208,13 +208,6 @@ describe("Showdown client side converter", function () { }); }); - it("should auto-link Email", function () { - var testPhrase = {input: "info@tryghost.org", output: /^

info@tryghost.org<\/a><\/p>$/}, - processedMarkup = converter.makeHtml(testPhrase.input); - - processedMarkup.should.match(testPhrase.output); - }); - it("should convert reference format URL", function () { var testPhrases = [ { diff --git a/core/test/unit/shared_gfm_spec.js b/core/test/unit/shared_gfm_spec.js index 131e5f07d6..0113fac143 100644 --- a/core/test/unit/shared_gfm_spec.js +++ b/core/test/unit/shared_gfm_spec.js @@ -121,13 +121,6 @@ describe("Github showdown extensions", function () { }); }); - it("should auto-link Email", function () { - var testPhrase = {input: "info@tryghost.org", output: /^info@tryghost.org<\/a>$/}, - processedMarkup = _ConvertPhrase(testPhrase.input); - - processedMarkup.should.match(testPhrase.output); - }); - it("should NOT auto-link URL in HTML", function () { var testPhrases = [ {