Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Editor keeps killing my JavaScript?Editor keeps killing my JavaScript?
Previous
 
Next
New Post
2/25/2011 3:03 PM
 
Hello,

I'm trying to add some JavaScript to a common TEXT/HTML module to protect an email address from spam bots.
The script is as follows :

 <script language='JavaScript' type='text/javascript'>
 <!--
 var prefix = '&#109;a' + 'i&#108;' + '&#116;o';
 var path = 'hr' + 'ef' + '=';
 var addy84818 = '&#105;nf&#111;rm&#97;t&#105;&#111;n' + '&#64;';
 addy84818 = addy84818 + 's&#105;ckm&#97;&#105;h&#97;k' + '&#46;' + 'c&#111;m';
 var addy_text84818 = '&#105;nf&#111;rm&#97;t&#105;&#111;n' + '&#64;' + 's&#105;ckm&#97;&#105;h&#97;k' + '&#46;' + 'c&#111;m';
 document.write( '<a ' + path + '\'' + prefix + ':' + addy84818 + '\'>' );
 document.write( addy_text84818 );
 document.write( '<\/a>' );
 //-->\n </script><script language='JavaScript' type='text/javascript'>
 <!--
 document.write( '<span style=\'display: none;\'>' );
 //-->
 </script>This email address is being protected from spam bots, you need Javascript enabled to view it
 <script language='JavaScript' type='text/javascript'>
 <!--
 document.write( '</' );
 document.write( 'span>' );
 //-->
 </script>

It works fine; does it suppose to. UNTIL I attempt to add it to the module. The editor cuts the entire script out leaving just:

This email address is being protected from spam bots, you need Javascript enabled to view it

Is there anyway to prevent this from happening? Or is there a special way I have to input my JavaScript or whats happening here? I don't think I can just toss this into the footer/header of the module since I'm attempting to repeat this for a few emails that are being presented in the module.

If anyone knows a work around, or knows what I'm missing here, it will be very much appreciated.

Cheers,
Dean

 
New Post
2/25/2011 3:09 PM
 
Figured out that if I used the "Basic Text Editor" I don't have this problem. Maybe it's just a bug in DNN? But I am unable to edit the module after the fact or it will kill my JavaScript.

Anyway to turn off this "auto-edit/correct" nonsense from the rich text editor?
 
New Post
2/25/2011 4:41 PM
 
Hi,
You can disable it in the tools.xml file regarding content filters...
 
New Post
2/28/2011 10:32 AM
 
apartments.split wrote:
Hi,
You can disable it in the tools.xml file regarding content filters...

 Hey,

Poking around in the tools.xml file, what exactly is it that I need to disable to prevent it from auto deleting my code?

Thanks,
Dean

 
New Post
2/28/2011 5:36 PM
 
Sorry wrong file. In ConfigDefault.xml add this property:

<property name="ContentFilters">0</property>

This should do it.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Editor keeps killing my JavaScript?Editor keeps killing my JavaScript?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out