mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Removed mailto auto-linking.
fixes #1617 - Removed test - Removed auto-linking from showdown gfm extension
This commit is contained in:
parent
cf86334aed
commit
bb4e48bf50
3 changed files with 0 additions and 19 deletions
|
@ -115,11 +115,6 @@
|
|||
return lookBehind ? wholeMatch : "<a href='" + wholeMatch + "'>" + wholeMatch + "</a>";
|
||||
});
|
||||
|
||||
// match email
|
||||
text = text.replace(/[a-z0-9_\-+=.]+@[a-z0-9\-]+(\.[a-z0-9-]+)+/gmi, function (wholeMatch) {
|
||||
return "<a href='mailto:" + wholeMatch + "'>" + wholeMatch + "</a>";
|
||||
});
|
||||
|
||||
// replace extractions
|
||||
text = text.replace(/\{gfm-js-extract-pre-([0-9]+)\}/gm, function (x, y) {
|
||||
return preExtractions[y];
|
||||
|
|
|
@ -208,13 +208,6 @@ describe("Showdown client side converter", function () {
|
|||
});
|
||||
});
|
||||
|
||||
it("should auto-link Email", function () {
|
||||
var testPhrase = {input: "info@tryghost.org", output: /^<p><a href=\'mailto:info@tryghost.org\'>info@tryghost.org<\/a><\/p>$/},
|
||||
processedMarkup = converter.makeHtml(testPhrase.input);
|
||||
|
||||
processedMarkup.should.match(testPhrase.output);
|
||||
});
|
||||
|
||||
it("should convert reference format URL", function () {
|
||||
var testPhrases = [
|
||||
{
|
||||
|
|
|
@ -121,13 +121,6 @@ describe("Github showdown extensions", function () {
|
|||
});
|
||||
});
|
||||
|
||||
it("should auto-link Email", function () {
|
||||
var testPhrase = {input: "info@tryghost.org", output: /^<a href=\'mailto:info@tryghost.org\'>info@tryghost.org<\/a>$/},
|
||||
processedMarkup = _ConvertPhrase(testPhrase.input);
|
||||
|
||||
processedMarkup.should.match(testPhrase.output);
|
||||
});
|
||||
|
||||
it("should NOT auto-link URL in HTML", function () {
|
||||
var testPhrases = [
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue