#2488: Encode email "mailto:" links (Fix #2220)
-----------------------------+----------------------------------------------
Reporter: aspenwebdesign | Owner:
Type: Bug | Status: new
Priority: Normal | Milestone:
Component: General | Version: FCKeditor 2.6.3 Beta
Resolution: | Keywords: Confirmed IE
-----------------------------+----------------------------------------------
Comment(by bestis):
And smarter regexp and patch..
{{{
--- /fckeditor/editor/dialog/fck_link/fck_link.js 2008-09-19
10:37:49.000000000 +0300
+++ fck_link.js 2008-10-02 17:55:22.000000000 +0300
@@ -194,7 +194,7 @@
}
// Try to match the email against the encode protection.
- var aMatch = aLinkInfo[2].match(
/^location\.href='mailto:'\+(String\.fromCharCode\([\d,]+\))\+'(.*)'$/ ) ;
+ var aMatch = aLinkInfo[2].match(
/^(void\()?location\.href='mailto:'\+(String\.fromCharCode\([\d,]+\))\+'(.*)'(\))?$/
) ;
if ( aMatch )
{
// The link is encoded
@@ -253,7 +253,7 @@
for ( var i = 0 ; i < address.length ; i++ )
aAddressCode.push( address.charCodeAt( i )
) ;
- return
'javascript:location.href=\'mailto:\'+String.fromCharCode(' +
aAddressCode.join( ',' ) + ')+\'?' + aParams.join( '&' ) + '\'' ;
+ return
'javascript:void(location.href=\'mailto:\'+String.fromCharCode(' +
aAddressCode.join( ',' ) + ')+\'?' + aParams.join( '&' ) + '\')' ;
}
// EMailProtection 'none'
}}}
--
Ticket URL: <http://dev.fckeditor.net/ticket/2488#comment:6>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac