Format Codes are changed when saving

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
Locked
TeXnik
Forum Members
Forum Members
Posts: 132
Joined: Thu Aug 07, 2008 12:45 pm

Format Codes are changed when saving

Post by TeXnik »

I have quite a problem.

When using formats in TinyMCE or FCKeditor, it looks good in the preview. As soon as I save and look at the webpage I get errors.
Going back to the editor in WYSIWYG it all looks fine, but when WYSIWIG off the code had been changed.

for example " reads now as

Code: Select all

&quote;
.

Everytime I edit minor thing, typing mistake for example, I have to turn WYSIWIG off after and change the formats manually again.

Any idea what causes this problem and how to overcome.

The problem occured when installed MLE 1.5.4 and imported a previous database. The collation of the database is entirely set to utf8.
alby

Re: Format Codes are changed when saving

Post by alby »

TeXnik wrote: for example " reads now as

Code: Select all

&quote;
.
Look in TinyMCE WYSIWYG > Advanced tab and try to change Encoding of entities

Alby
Peciura

Re: Format Codes are changed when saving

Post by Peciura »

There is nothing you can do if you want to avoid of changing
" to &quote;
to >
& to &
they are allways encoded to produce valid XML parsable content like: "hello" and never "hello".


unless you want to dive in php or JS code( tiny_mce.js 161K symbols). To decode entities in one UDT  i use

Code: Select all

$return = str_replace('amp;', '',$return);
$return = str_replace('>', '>',$return);
$return = str_replace('<', '<',$return);
$return = str_replace(' ', ' ',$return);
$return = str_replace('"','"',$return);
$return = html_entity_decode ($return);
To make things better you can allways uncheck "Startup enabled:" in advanced tab of TinyMCE module.
TeXnik
Forum Members
Forum Members
Posts: 132
Joined: Thu Aug 07, 2008 12:45 pm

Re: Format Codes are changed when saving

Post by TeXnik »

alby wrote:
TeXnik wrote: for example " reads now as

Code: Select all

&quote;
.
Look in TinyMCE WYSIWYG > Advanced tab and try to change Encoding of entities

Alby
In TinyMCE the setting was RAW (without change).

My severe problem is, that for correction of some typing mistakes, I have to turn WYSIWYG off and change manually all modified code again, then I I can save. If I forget to do so I get error messages (smarty error or can not read content) and the formatting of text or links appear as sourcecode not formated or as link on the webpage.

As the webpage appears correctly, I assume the data are saved correctly, but when reading the data from the database something must happen.

And this comes regardless which editor I use.  I save without WYSIWYG and when reload the page for editing, it is changed. Before saving again, I have to look through the entire page which codes must be changed back.
You can imagine that is quite stressing.

Maybe it will be more clear if I create the error on the page again http://www.thaiwahn.de/index.php?page=home&hl=de_De
On the right there is a box which should show your screen resolution

Code: Select all

{global_content name="Resolution-$lang"}
But when loading the page for editing in the source code this changes to

Code: Select all

<p>{global_content name="Resolution-$lang"}</p>
Below this is a small box telling that the pics below change with every opening of the page

Code: Select all

<span style="font-size:xx-small;">Jeder Aufruf der Seite, ruft auch ein neues Bid auf</span>
formatted as a small font.
Now load the page in CMSmadesimple for editing and forget to correct this small box,

the content of the box had been changed without my doing and is now:

Code: Select all

<p>[size= xx-small]Jeder Aufruf der Seite, ruft auch ein neues Bid auf[/size]</p>
which you can see on the page.
And as I mentioned this happens independently from the editor, therfore it should not be caused by the editors.
Locked

Return to “[locked] CMSMS MLE fork”