Been working on this for hours on end now. I'm trying to use drutex (6.x-1.0-beta1) with wysiwyg (6.x-2.4+19-dev) and ckeditor (ckeditor_3.6.4).

The ampersand (and other entities) are converted to &. I have written a little module which loads an additional js-file where I try to set some properties that should deactivate conversion of HTML entities, but without any success so far.

Please review my code and let me know if this is the wrong approach or give me other insights which will help me make this work. There is some additional information below the code.

The .info

name = Drutex CKeditor Compability
description = Prevents CKEditor from encoding html entities, such as ampersands, for compatibility with DRUTEX module.
core = 6.x
package = "Input filters"
dependencies[] = wysiwyg

version = "6.x-1.0"
core = "6.x"

The .module

/**
* Implements hook_wysiwyg_editor_settings_alter().
*/
function drutex_ckeditor_compability_wysiwyg_editor_settings_alter(&$settings, $context) {
  if ($context['profile']->editor == 'ckeditor') {
    $settings['customConfig'] = '/' . drupal_get_path('module', 'drutex_ckeditor_compability') . '/ckeditor.config.js';
    drupal_set_message('Custom WYSIWYG editor settings loaded');
  }
}

I've added the drupal_set_message to see if it is run, and it is.

The .js

CKEDITOR.editorConfig = function(config) {
    config.entities = false;
    config.htmlEncodeOutput = false;
}

However, when I type something in the CKeditor field and click the source button in the editor the entities are converted to & etc.

Also, if I write some latex and save it the output of drutex are images with <br>, &amp; and other htmlentities. What am I missing, please?