#2220: Encode email "mailto:" links
---------------------------+------------------------------------------------
Reporter: asuter | Type: New Feature
Status: new | Priority: Normal
Milestone: | Component: UI : Dialogs
Version: FCKeditor 2.6 | Keywords: link dialog, email, encode
---------------------------+------------------------------------------------
So far the email address typed in the link dialog gets packed as a href-
attribute unencoded into the html source. This is easy for spambots to be
scanned and so it is necessary to at least obscure the mail address. This
proposal provides a possibility to encode the email address using the
simple String.fromCharCode() technique.
We modify the file "editor/dialog/fck_link/fck_link.js" such that the
method oParser.CreateEMailUri returns the email href-attribute not in
plain text but encoded.
Replace the return statement of the oParser.CreateEMailUri method
{{{
return sBaseUri + sParams ;
}}}
by
{{{
var uri = sBaseUri + sParams ;
var urj = '' ;
for ( var i = 0; i < uri.length; i ++ ) {
if ( i > 0 ) { urj += ','; }
urj += uri.charCodeAt(i) ;
}
return 'javascript:location.href=String.fromCharCode(' + urj + ')' ;
}}}
As the "protocol" of the link is no more "mailto", we should implement
also a decoder that from the encoded href-attribute gets back the email
address as well as the subject and the body. This is important if the
CKEditor user wants to edit again an encoded email link. This is not yet
implemented.
--
Ticket URL: <http://dev.fckeditor.net/ticket/2220>
FCKeditor <http://www.fckeditor.net>
The text editor for Internet
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac