Item 20 of 107 Previous | Next

1

Fixed

Feature request: obfuscate mailto links

description

On my wishlist for already a long time: Be able to obfuscate mailto hyperlinks easily.

I did some research in this matter and these are the hyperlinks I gathered explaining several ways to implement obfuscation. Thing is to find a method that works in all browsers.
http://csarven.ca/hiding-email-addresses
http://techblog.tilllate.com/2008/07/20/ten-methods-to-obfuscate-e-mail-addresses-compared/
http://www.josephfinsterwald.com/UI/Pages/article4.aspx
http://jace.zaiki.in/2011/03/22/spam-proofing-email-addresses

I would prefer this to be a checkbox option in the create hyperlink dialog. But that is probably out of scope of this provider.
Anyway, there seems to be a hook for developers to implement a non-optional method via the config:
For more information: Look for CKEDITOR.config.emailProtection on this page: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html

So you might say: why not use config.emailProtection = 'encode' ?
Well, I did years ago but under some conditions it has drawbacks. I can't remember however what those where. I'll try using it again.


Other usefull links:
http://cksource.com/forums/viewtopic.php?t=22163
http://dev.ckeditor.com/ticket/2220

No files are attached

comments

rsiera wrote Feb 24 at 11:19 AM

Thx @Xeevis, interesting idea, the handle approach. And as always it has been done before: https://www.coderesort.com/p/epicode/wiki/Epinova.EmailObfuscator

Xeevis wrote Feb 24 at 10:28 AM

If I may add my idea into the fray I believe its unnecessary and too granular to implement this kind of manipulation on editor level. The way I see it there are 2 options, either use widget and javascript to work with mailto links (has drawback of not being effective with javascript disabled crawlers if thats what you are concerned with). Or use HttpHandler to manipulate mailto links before page is served. Both are rather trivial to make and work on entire website scope.

Xeevis wrote Feb 24 at 10:27 AM

If I may add my idea into the fray I believe its unnecessary and too granular to implement this kind of manipulation on editor level. The way I see it there are 2 options, either use widget and javascript to work with mailto links (has drawback of not being effective with javascript disabled crawlers if thats what you are concerned with). Or use HttpHandler to manipulate mailto links before page is served. Both are rather trivial to make and work on entire website scope.

tha_watcha wrote Feb 21 at 2:16 PM

The existing one is the links plugin, where you can choose between link, anchor, and email link.

rsiera wrote Feb 21 at 1:40 PM

Thanks for giving this some thought.
Any idea where I can find the existing mail window plugin?

tha_watcha wrote Feb 21 at 11:51 AM

I dont see a better option then the current one that is included in the editor, lets the editor handle the encoding inside the link window otherwise there would be problems recognize them. Especially when you want to choose for each link if obfuscate or not. The Only way doing this would be writting a custom mail window plugin or modifying the existing one.

And i am not sure does mail obfuscation is needed anymore or is it worth the trouble trying to find a better solution? The 2 Techniques that the editor use can be read easily by spam bots.

rsiera wrote Feb 21 at 8:07 AM

One extra concern: if obfuscation can't be optional then the method used should at least result in HTML source that can be used emails. I mean that when using the editor to create an email newsletter any obfusticated mailto links should also work in the final mail client. So runtime javascript methods would not work. If obfuscation could be made optional then one could disable it when creating an email text.