Weird javascriot when editing incldues an email address
Posted: 25 April 2008 01:14 PM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  46
Joined  2007-09-10

Hello again smile

I’m using Form Helper to edit entries. In the admin, I have “Automatically turn URLs and email addresses into links?” marked to Yes. When Yes is selected, and I try and edit a page that has an email address on it, I get a bunch of weird gobbledygook in the edit box. Looks like this:

email for FULL NAME:  
//<![CDATA[
var l=new Array();
l[0]='>';l[1]='a';l[2]='/';l[3]='<';l[4]=' 116';l[5]=' 101';l[6]=' 110';l[7]=' 46';l[8]=' 101';l[9]=' 110';l[10]=' 105';l[11]=' 97';l[12]=' 109';l[13]=' 45';l[14]=' 109';l[15]=' 111';l[16]=' 99';l[17]=' 115';l[18]=' 117';l[19]=' 115';l[20]=' 64';l[21]=' 110';l[22]=' 101';l[23]=' 115';l[24]=' 110';l[25]=' 101';l[26]=' 114';l[27]='>';l[28]='"';l[29]=' 116';l[30]=' 101';l[31]=' 110';l[32]=' 46';l[33]=' 101';l[34]=' 110';l[35]=' 105';l[36]=' 97';l[37]=' 109';l[38]=' 45';l[39]=' 109';l[40]=' 111';l[41]=' 99';l[42]=' 115';l[43]=' 117';l[44]=' 115';l[45]=' 64';l[46]=' 110';l[47]=' 101';l[48]=' 115';l[49]=' 110';l[50]=' 101';l[51]=' 114';l[52]=':';l[53]='o';l[54]='t';l[55]='l';l[56]='i';l[57]='a';l[58]='m';l[59]='"';l[60]='=';l[61]='f';l[62]='e';l[63]='r';l[64]='h';l[65]='a ';l[66]='<';
for (var 
l.length-1>= 0i=i-1)
if (l[i].substring(01) == ' '[removed]("&#"+unescape(l[i].substring(1))+";"); 
else 
[removed](unescape(l[i]));
}
//]]>

But, if I tell the system to not parse the email addresses, by selecting No in the admin, this dissapears. And I can then edit properly using Form Helper. I do not see this wen I edit from the CP, only using Form Helper.

Thank you for your help!

Profile
 
 
Posted: 25 April 2008 01:33 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2320
Joined  2006-10-18

Evoir,

It’s ExpressionEngine that does it… so there’s not much you can do… though it’s been said that adding a Third Party WYSIWYG editor like TinyMCE solves this issue… as well as provides additional goodies of course wink

http://tinymce.moxiecode.com/example_full.php?example=true
http://www.fckeditor.net/

 Signature 
Profile
 
 
Posted: 25 April 2008 01:42 PM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  46
Joined  2007-09-10

Hmmm. That stinks. How come it works in th CP but not in the Form Helper?

Profile
 
 
Posted: 25 April 2008 02:14 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2320
Joined  2006-10-18

It’s the way EE Outputs email addresses in templates. Try displaying an email address in a template and viewing your source code… you’ll see the same giberish wink
All that FormHelper does is display that same data, the same way, into your form fields....

Though I will submit this as a feature request smile

 Signature 
Profile
 
 
Posted: 02 July 2008 05:22 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  11
Joined  2008-06-26

This workaround might help.

Profile