Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically encode all email links using as hex HTML entities #212

Closed
wants to merge 1 commit into from
Closed

Automatically encode all email links using as hex HTML entities #212

wants to merge 1 commit into from

Conversation

apfelbox
Copy link
Contributor

@apfelbox apfelbox commented Sep 2, 2014

It currently only encodes the href, not any content of the node.

So something like

[mail@example.org](mailto:mail@example.org) will only encode the link.
The same goes for <mail@example.org>.

Although in the latter case one could actually argue to also encode the text.
Thoughts?

Fixes #193

It only encodes the `href`, not any content of the node.
@ghost
Copy link

ghost commented Sep 5, 2014

This should be definitly an optional feature if accepted by @erusev. There are people out there that use other methods to obfuscate email addresses or a cms ist handling this automatically.

@cebe
Copy link
Contributor

cebe commented Sep 5, 2014

The encoding of emails is part of the markdown description by John Gruber so it should be enabled by default imo.

@hkdobrev
Copy link
Contributor

hkdobrev commented Sep 5, 2014

It is part of markdown, but I don't think it is still relevant. Anti-spam detection have become better and some people do not want obfuscation.

@ghost
Copy link

ghost commented Sep 5, 2014

@hkdobrev 👍

@apfelbox
Copy link
Contributor Author

apfelbox commented Sep 7, 2014

CommonMark doesn't mention anything about it, too.

The patch is simple enough - should I submit a PR against parsedown-extra. Maybe you could choose your encoding mechanism, something like Smarty does (encode parameter).

@aidantwoods
Copy link
Collaborator

I think this is out of scope for now since it isn't part of CommonMark or the GitHub Flavoured extension.

Just to comment about email obfuscation in general: IMO it is better to display the email in plaintext without obfuscation so that users can see that the email is given out in plaintext. It's trivial to write a decoder for email addresses obfuscated in this way, and I think the worst thing of all would be for a user to believe that they somehow had not given their email address out publicly because of obfuscation.

If you give out your email address, encoded or not, you've still given out your email address. I think we shouldn't hide this fact.

The appearance of safety or security where there is none is likely to be worse than none on its own, because it will likely encourage the user to behave as if there were some in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Encoded emails when using 'autolink'
5 participants