fix(encodeEmail): now produces valid emails

Closes #340
This commit is contained in:
Estevao Soares dos Santos 2017-02-06 06:50:52 +00:00
parent 368f0b6309
commit 605d8b7b05
8 changed files with 5 additions and 1 deletions

BIN
dist/showdown.js vendored

Binary file not shown.

BIN
dist/showdown.js.map vendored

Binary file not shown.

BIN
dist/showdown.min.js vendored

Binary file not shown.

Binary file not shown.

View File

@ -25,6 +25,10 @@ var showdown = {},
ghCompatibleHeaderId: true,
ghMentions: true
},
original: {
noHeaderId: true,
ghCodeBlocks: false
},
vanilla: getDefaultOpts(true),
allOn: allOptionsOn()
};

View File

@ -40,8 +40,8 @@ showdown.subParser('autoLinks', function (text, options, globals) {
b = b || '';
mail = showdown.subParser('unescapeSpecialChars')(mail, options, globals);
if (options.encodeEmails) {
mail = showdown.helper.encodeEmailAddress(mail);
href = showdown.helper.encodeEmailAddress(href + mail);
mail = showdown.helper.encodeEmailAddress(mail);
} else {
href = href + mail;
}

View File

View File