WYSIWYG breaking symbols

WYSIWYG breaking symbols, a forum discussion on Jojo CMS. Join us for more discussions on WYSIWYG breaking symbols on our Administration (backend and configuration) forum.

Back to Forum Index : Back to Administration (backend and configuration)   RSS
damien damien

1 May 2008
Posts: 24

The WYSIWYG editor is converting special symbols etc. &specialE; to the actual symbol, instead of keeping the HTML code for it. Which then doesnt display in the browser properly.

Can you fix this problem?
tom

Developer

tom

5 May 2008
Posts: 379

Can you give me an example? Mostly I just type them in (as the character itself - like é ), or use the "Paste as Plain Text" an let the editor do the coding - which generally works..

Are you typing the html entity code into the editor? in WYSIWYG mode or code mode?
damien damien

7 May 2008
Posts: 24

For example, when i try to use this code, é , the WYSIWYG editors converts it to the actual symbol

Even when i put the code in via the HTML editor, and THEN use the WYS editor, it still converts them. Basically as soon as the WYS editor is used, this problem occurs
tom

Developer

tom

7 May 2008
Posts: 379

Ah yes. I see what you mean..
The WYSIWYG editor used in Jojo is Xinha - I'm reasonably sure it didn't used to behave like this, they may have altered something recently (Jojo pulls the latest version of Xinha from their svn site) - i'll have a look on their site (http://xinha.webfactional.com/) and see if any clues come to light.
tom

Developer

tom

7 May 2008
Posts: 379

From the bug tracker on the Xinha site:

"xinha types only the plain-text characters and not their html-equivalents. When I enter e.g. ä in html-mode and change to wysiwyg-mode the ä gets changed to ä.

* status changed from new to closed
* resolution set to wontfix

That's way it is. Use HtmlEntities plugin"

!! I've tried adding in the HtmlEntities plugin.. but it doesn't seem to make much difference
from the Xinha forum:

"Currently I process my HTML before and after Xinha in the PHP page that loads it with a series of regular expressions to fix other problems. I grab the body events and then put them back in because I know Mozilla will remove them, I convert php to long script notation because otherwise Mozilla will destroy it, and I strip any surviving unwanted absolute paths. I block JavaScript execution in the editor by changing the name of the script language, and then return it to JavaScript on save.

Xinha is the only higher end WYSIWYG that I know of that does not support HTML entities, but as I do not have control over encoding in my server environment or the CMS I use, I very much do have to convert special characters into HTMLentities. Every time the GetHtml plugin is changed, I save its js file as UTF-8 and add a regular expression for every character I need to prevent the destruction of.

In other words, I feel your pain."

Grr. I'll look into some form of pre/post processing for Xinha content
tom

Developer

tom

7 May 2008
Posts: 379

Bug fix added. I'll test it more thoroughly tomorrow, and it should be in the nightly snaps tonight(?)

I think the main bit is adding
xinha_config.sevenBitClean = true;

to xinha.php in jojo_core/external/wysiwyg-interface
damien damien

8 May 2008
Posts: 24

Where can i find the fixed file?
Which plugin is it in? jojo_core?
tom

Developer

tom

8 May 2008
Posts: 379

full path:
jojo/plugins/jojo_core/external/wysiwyg-interface/xinha.php

the fix is available either via svn in the trunk copy

or in snaps

or open that file on your install and put this
xinha_config.sevenBitClean = true;
in at line 55 or so (just before:
xinha_config.ExtendedFileManager.<?php

You may also need to add this to the plugins section above that, after 'InsertAnchor' add:
,
'HtmlEntities'

damien damien

8 May 2008
Posts: 24

Great! That fixed it perfectly, what a small mistake lol
Thanks for the help Tom

ps. I wonder if this affects the alpha...
Back to Forum Index : Back to Administration (backend and configuration)   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.