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.
You must be logged in to post a reply
| |
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?
Can you fix this problem?
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?
Are you typing the html entity code into the editor? in WYSIWYG mode or code mode?
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
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
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.
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.
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
"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
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
I think the main bit is adding
xinha_config.sevenBitClean = true;
to xinha.php in jojo_core/external/wysiwyg-interface
Where can i find the fixed file?
Which plugin is it in? jojo_core?
Which plugin is it in? jojo_core?
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'
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'
Great! That fixed it perfectly, what a small mistake lol
Thanks for the help Tom
ps. I wonder if this affects the alpha...
Thanks for the help Tom
ps. I wonder if this affects the alpha...
| Back to Forum Index : Back to Administration (backend and configuration) |
|
