I'm using CKEditor with WYSIWYG Filter, and I have CKEditor configured to obfuscate/encrypt email links using JavaScript. However, WYSIWYG filter strips all JavaScript out, which causes the links to break. Since the email links being encrypted by CKEditor is a built in feature, I'm hoping there is some way to get them to work. Both the Drupal HTML Filter and the WYSIWYG Filter strip JavaScript and there is no way to turn that off, that I know of. I don't want to stop having email links encrypted, because that leads to increased spam... and I don't want to disable the WYSIWYG Filter for all users, since that would be really insecure...

Drupal 6.25
CKEditor 3.6.2
CKEditor - WYSIWYG HTML editor 6.x-1.10+15-dev (2012-Mar-30)
WYSIWYG Filter 6.x-1.x-dev (2011-Feb-25)

Comments

mkesicki’s picture

Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

What do you mean by saying:

I have CKEditor configured to obfuscate/encrypt email links using JavaScript

In what way you have CKEditor configured to encrypt email ?
You use some plugin, module to drupal or what option do you use to do this ?

If Wysiwyg filter strip your JavaScript code, it looks that problem is here. You should configure Wysiwyg filter to don't strip JavaScript code that you need or maybe use other filter like HtmlPurifier

jlea9378’s picture

Status: Postponed (maintainer needs more info) » Active

{String} CKEDITOR.config.emailProtection
Since: 3.1
The e-mail address anti-spam protection option. The protection will be applied when creating or modifying e-mail links through the editor interface.
Only the e-mail address is obfuscated into a special string that has no meaning for humans or spam bots, but which is properly rendered and accepted by the browser.
config.emailProtection = 'encode';

As far as I can tell, there is no way for WYSIWYG Filter to be configured to allow JavaScript.

mkesicki’s picture

Status: Active » Postponed (maintainer needs more info)

@jlea9378,
thank for your answer.
If I understand everything good it looks that this is not problem with CKEditor but with Drupal's filtering (Wysiwyg filter in your case). Maybe you should use other filters or write your custom one.
Please check if without Wysiwyg filter everything works as expected, just to be sure.