I have been struggling with this for some month now, and am still looking to find a solution.

For reasons unbeknown to me, only in rich-text-mode TinyMCE filters   out of the input. When I enter them with rich-text-mode disabled and save and retrieve the content   are still there. When I switch to rich-text-mode and back (even without saving) the   are gone. When I enter them with the help of the character-map, I can see the space, but there is none in the HTML when I look at it with rich-text-mode disabled and the space is gone when I enable rich-text-mode again.

When I check this out on the Moxicode site   are preserved and visible when I look at the HTML. That leads me to believe that it's not TinyMCE's fault.

I am using the WYSIWYG-API with TinyMCE 3.2.1.1 and have seen this on several installations I have done during the last year.

Can somebody please shed some light onto this strange behavior?

Kind regards,

Frank

Comments

pbarnett’s picture

In my tinymce.module, in function tinymce_config($profile) there's a line that reads :-

  $init['entity_encoding']    = 'raw';

According to http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/entity_encoding this should be changed to

  $init['entity_encoding']    = 'named';

Does this help at all?

Pete.

spade’s picture

Hi Pete,

thanks a bunch, you cured my headache. :-)

Would you have any idea why 'we' changed this for Drupal?

Maybe, if this is a wanted behavior, there should be a setup option where one can choose which way one wants it.

Kind regards,

Frank

pbarnett’s picture

Maybe you should raise this as a feature request in the issues for WYSIWYG...

Pete.

spade’s picture

pbarnett’s picture

Excellent!

It's a buzz when you can actually pounce on a problem and find the cause!

And even more so when the contribution results in a fix! Good catch, sun! :-)

Pete.

seanspeng’s picture

I installed the latest version of tinymce, and still have this problem. Could anyone tell me which file should I edit to change the above line?

Thanks a lot!

pbarnett’s picture

seanspeng’s picture

Thank you very much!