Skip to content

Commit

Permalink
fix(encodeEmail): now produces valid emails
Browse files Browse the repository at this point in the history
Closes #340
  • Loading branch information
tivie committed Feb 6, 2017
1 parent 368f0b6 commit 605d8b7
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 5 deletions.
6 changes: 5 additions & 1 deletion dist/showdown.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/showdown.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/showdown.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/showdown.min.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/showdown.js
Expand Up @@ -25,6 +25,10 @@ var showdown = {},
ghCompatibleHeaderId: true,
ghMentions: true
},
original: {
noHeaderId: true,
ghCodeBlocks: false
},
vanilla: getDefaultOpts(true),
allOn: allOptionsOn()
};
Expand Down
2 changes: 1 addition & 1 deletion src/subParsers/autoLinks.js
Expand Up @@ -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;
}
Expand Down
Empty file.
Empty file added test/cases/obfuscated-emails.md
Empty file.

0 comments on commit 605d8b7

Please sign in to comment.