ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

mail encoding since 1.6.7 - TinyMCE

March 03, 2009 10:23am

Subscribe [4]
  • #1 / Mar 03, 2009 10:23am

    noregt

    360 posts

    Hello everyone,

    Since upgrading to 1.6.7, the javascript “eeEncEmail” encoding results in some problems related to IE usage and Tiny MCE.

    I think I have narrowed it down to the following:
    If users type something like .(JavaScript must be enabled to view this email address) and hit Enter, in IE7 automatically a mailto tag will be generated in the input field. This results in problems with the javascript code:

    <a href="mailto:[email protected]"><span>(JavaScript must be enabled to view this email address)</span>[removed]_//<![CDATA[_var l=new Array();_var output = '';_l[0]='>';l[1]='a';l[2]='/';l[3]='<';l[4]=' 108';l[5]=' 110';l[6]=' 46';l[7]=' 116';l[8]=' 115';l[9]=' 101';l[10]=' 116';l[11]=' 64';l[12]=' 114';l[13]=' 101';l[14]=' 116';l[15]=' 115';l[16]=' 101';l[17]=' 116';l[18]='>';l[19]='\"';l[20]=' 108';l[21]=' 110';l[22]=' 46';l[23]=' 116';l[24]=' 115';l[25]=' 101';l[26]=' 116';l[27]=' 64';l[28]=' 114';l[29]=' 101';l[30]=' 116';l[31]=' 115';l[32]=' 101';l[33]=' 116';l[34]=':';l[35]='o';l[36]='t';l[37]='l';l[38]='i';l[39]='a';l[40]='m';l[41]='\"';l[42]='=';l[43]='f';l[44]='e';l[45]='r';l[46]='h';l[47]='a ';l[48]='<';_for (var i = l.length-1; i >= 0; i=i-1){ _if (l[i].substring(0, 1) == ' ') output += "&#"+unescape(l[i].substring(1))+";"; _else output += unescape(l[i]);_}_document.getElementById('eeEncEmail_LBQw1uQ25A')[removed] = output;_//]]>_[removed]</a>

    As you can see, the mailto tag survived the script here. In Firefox it shows up like it should, bit in IE it won’t show up at all.

    CASE 2:Different website, but with the same setup and hoster, a different output:

    <a href="mailto:[email protected]"><span>(JavaScript must be enabled to view this email address)</span>[removed]_//<![CDATA[_var l=new Array();_var output = '';_l[0]='>';l[1]='a';l[2]='/';l[3]='<';l[4]=' 108';l[5]=' 110';l[6]=' 46';l[7]=' 116';l[8]=' 115';l[9]=' 101';l[10]=' 116';l[11]=' 64';l[12]=' 116';l[13]=' 115';l[14]=' 101';l[15]=' 116';l[16]='>';l[17]='\"';l[18]=' 108';l[19]=' 110';l[20]=' 46';l[21]=' 116';l[22]=' 115';l[23]=' 101';l[24]=' 116';l[25]=' 64';l[26]=' 116';l[27]=' 115';l[28]=' 101';l[29]=' 116';l[30]=':';l[31]='o';l[32]='t';l[33]='l';l[34]='i';l[35]='a';l[36]='m';l[37]='\"';l[38]='=';l[39]='f';l[40]='e';l[41]='r';l[42]='h';l[43]='a ';l[44]='<';_for (var i = l.length-1; i >= 0; i=i-1){ _if (l[i].substring(0, 1) == ' ') output += "&#"+unescape(l[i].substring(1))+";"; _else output += unescape(l[i]);_}_document.getElementById('eeEncEmail_BJXRrLQbgS')[removed] = output;_//]]>_[removed]</a>

    This result in

    (JavaScript must be enabled to view this email address)

    And in this case this sentence has a mailto link.

    I’m a little puzzled what to do here. I know Tiny MCE is not ideal, but so far it worked nicely, also with the mail addresses. Thanks for any help!

    Moved to General by Moderator

  • #2 / Mar 03, 2009 10:38am

    Sue Crocker

    26054 posts

    TinyMCE is a third party solution. I’m going to move this to the General forum for additional community interaction.

  • #3 / Apr 02, 2009 12:36pm

    I Hussey

    7 posts

    I am sure I had the same problem - I left it for weeks then I found a nice simple work around:

    in tinymce remove the mail:to link using the button on tiny mce toolbar. When you press update in expression engine the link is automatically put back in but it actually works in IE7 without showing the ‘you need javascript enabled message’

  • #4 / Apr 02, 2009 4:47pm

    noregt

    360 posts

    Thanks for the tip I Hussey. The only point is that I use TinyMCE for dummies and websites that are used by groups. Hard to give everyone personal instructions about how to handle the links. The combination of EE and Tiny MCE is a bit troublesome, so lately I’ve not been promoting it, instead I’m using just the imagemanager.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases