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

Improve Email Social Icon with automatic "mailto:" and obfuscation #21876

Closed
mrwweb opened this issue Apr 24, 2020 · 6 comments · Fixed by #42186 or #57384
Closed

Improve Email Social Icon with automatic "mailto:" and obfuscation #21876

mrwweb opened this issue Apr 24, 2020 · 6 comments · Fixed by #42186 or #57384
Assignees
Labels
[Block] Social Affects the Social Block - used to display Social Media accounts [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@mrwweb
Copy link

mrwweb commented Apr 24, 2020

This is an offshoot of #21733

Is your feature request related to a problem? Please describe.
At present, the default placeholder for all social icons is the same: "Enter Address". This is a unique problem for the email icon:

mail icon entry field reads "Enter Address"

Someone who reads that as "enter email address", would enter just their email address. Doing so results in appending an email with "http://".

mail icon entry field containing "info@example.com"

This would result in an invalid link going to "http://info@example.com". I suspect there are now many links like this due to this problem. (See also: #21699)

Describe the solution you'd like
Similar to #19425, the icon should handle automatically appending "mailto:" if the user does not enter it.

Going further, it would be ideal to obfuscate the emails via an antispambot()-like method to offer at least some level of spam protection. There's no reason that couldn't be done automatically.

@karmatosed karmatosed added the [Type] Enhancement A suggestion for improvement. label Apr 24, 2020
@karmatosed
Copy link
Member

Feels like a great little enhancement to me. I can't see you would add anything that isn't a mailto there, or at least that doesn't seem to be as common.

@mrwweb
Copy link
Author

mrwweb commented Apr 24, 2020

@karmatosed makes a good point that it would be worth testing for the presence of an @ in case folks are linking to a contact form or something.

something like this pseudo code logic for testing the submitted "email"

if( contains '@' && doesn't contain 'mailto:' && doesn't start with 'http'  ) {
    prepend 'mailto:'
} else if( doesn't contain '@' && doesn't start with 'http' {
   prepend 'http://'
} else {
   don't do anything
}

@derweili
Copy link
Contributor

Feels like a great little enhancement to me. I can't see you would add anything that isn't a mailto there, or at least that doesn't seem to be as common.

Linking a page with a contact form could be a use case for the mail icon with a http:// link.

@Mamaduka Mamaduka added the [Block] Social Affects the Social Block - used to display Social Media accounts label Jul 6, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 6, 2022
@Mamaduka
Copy link
Member

Mamaduka commented Jul 6, 2022

Hi, @mrwweb

Created PR to handle the mailto prefixes. The obfuscation probably should be handled by anti-spam plugins.

@mrwweb
Copy link
Author

mrwweb commented Jul 6, 2022

Created PR to handle the mailto prefixes.

Awesome! Thanks, @Mamaduka

The obfuscation probably should be handled by anti-spam plugins.

Given that antispambot() is a core function, it feels like it would be well within the scope of core to handle this and avoid forcing people to opt in to it. Are there specific concerns you had about implementing that behavior?

@Mamaduka
Copy link
Member

Mamaduka commented Jul 6, 2022

That's a good point, @mrwweb.

I will re-open this issue since obfuscation is still missing from the Social block.

@Mamaduka Mamaduka reopened this Jul 6, 2022
@Mamaduka Mamaduka removed their assignment Apr 20, 2023
@Mamaduka Mamaduka removed the [Status] In Progress Tracking issues with work in progress label Apr 20, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Social Affects the Social Block - used to display Social Media accounts [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
6 participants
@ockham @Mamaduka @karmatosed @mrwweb @derweili and others