From e784be49737e3ea2c2653b2d01a20a4a120d2bea Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Wed, 8 Jul 2009 14:54:57 -0300 Subject: [PATCH] ActionItem1152: fixing & bug on tinymce --- app/views/shared/tiny_mce.rhtml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/app/views/shared/tiny_mce.rhtml b/app/views/shared/tiny_mce.rhtml index 1d49ff4..78307b5 100644 --- a/app/views/shared/tiny_mce.rhtml +++ b/app/views/shared/tiny_mce.rhtml @@ -23,7 +23,8 @@ tinyMCE.init({ paste_use_dialog: false, apply_source_formatting : true, content_css: '/stylesheets/tinymce.css', - language: <%= tinymce_language.inspect %> + language: <%= tinymce_language.inspect %>, + cleanup_callback : "customCleanup" }); function convertWord(type, content) { @@ -41,8 +42,17 @@ function convertWord(type, content) { return content; } - - - +function customCleanup(type, value) { + switch (type) { + case "get_from_editor": + value = value.replace(/&amp;/g,"&"); + break; + case "insert_to_editor": + value = value.replace(/&amp;/g,"&"); + break; + } + return value; +} + -- libgit2 0.21.2