• Tiny MCE adding code to my pages...#

  • mdsdesign Reply #1, 8 months ago

    Reply
    I'm not sure when this started happening, but I believe it was when I updated this site to ModX Evo 1.0.5 it says I'm now using Tiny MCE 3.3.9.2. See a sample of the code below:
    <table border="\"1\"" cellspacing="\"0\"" cellpadding="\"0\"" width="\"645\"">
    <tbody>
    <tr>
    <td width="\"176\"">
    <p><a name="\"Adult\"" href="\"[~70~]\""></a><a class="\"justifyleft\"" href="\"[~70~]\"">Adult Education</a><a name="\"Advocate\""></a></p>
    </td>
    <td width="\"150\"">
    <p>Teresa Rodgers</p>
    </td>
    <td width="\"106\"">
    <p>610-253-7794</p>
    </td>
    <td width="\"203\"">
    <p><a href="http://mce_host/\"mailto:terodgers@rcn.com\"">terodgers@rcn.com</a></p>
    
    </td>
    </tr>
    <tr>
    <td>
    <p><a href="\"[~30~]\"">Advocate for Persons with Disabilities</a><a name="\"Angel\""></a></p>
    </td>
    <td>


    It looks like it's putting in the code for Quotes instead of just leaving them alone.

    Any ideas how to stop this from happening?


  • mdsdesign Reply #2, 8 months ago

    Reply
    Interesting... the code looks fine when pasted in the code window all of the \" went away... I'm so confused. This has never happened with all of my modx installs and I have more than 30 sites.


  • sottwell Reply #3, 8 months ago

    Reply
    It looks more like your PHP has magic_quotes_gpc set ON.


  • mdsdesign Reply #4, 8 months ago

    Reply
    That could be it. I know my host recently upgraded from php 5.2 to 5.3. Perhaps that's when it was changed. I will check with them and report back.

    There isn't a setting in Tiny MCE that could fix it is there?


  • sottwell Reply #5, 8 months ago

    Reply
    Are you sure it's TinyMCE doing it? Or is it happening when it gets saved to the database?


  • mdsdesign Reply #6, 8 months ago

    Reply
    No idea. It wasn't happening before and now it is.


  • mdsdesign Reply #7, 8 months ago

    Reply
    Hi Susan,

    I spoke with my host and Magic Quotes being on has always been the default. We never had an issue before but they did upgrade to the latest version of PHP 5.3.

    I can force it back to 5.2 using an .htaccess file or I can try turning Magic Quotes Off.

    You asked about it happening when being written to the database. How would I be able to find that out?

    Sorry if these are dumb questions. I'm much more of a designer and this is all a bit confusing to me.

    I have many, many ModX sites with this host and on another host. I've never seen this and am hoping it doesn't start happening on all of my sites.


  • sottwell Reply #8, 8 months ago

    Reply
    Try turning off tinymce for the resource, edit it clean and save it, and see what happens. If it does it anyway, then you'll know it's the PHP adding it to the POST. (the gpc part means GET, POST and COOKIE). MODx doesn't need it, since MODx properly escapes dangerous characters before inserting them into the database. Magic_quotes_gpc will go away soon, and it's not really a good idea anyway.

    This feature has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.

    http://php.net/manual/en/security.magicquotes.php


  • mdsdesign Reply #9, 8 months ago

    Reply
    Hi Susan,

    Thanks for your help. I used the .htaccess file to force the server back to php 5.2 and everything was fine again. So, I guess I'll have to experiment with turning off magic quotes in php 5.3 and then see what happens. I'm wondering if anyone else is seeing this problem. I've tried searching the forums but I'm not having much luck with finding any similar problems.

    I appreciate your help. I'll report back here as I try a few more of the suggestions.


  • sottwell Reply #10, 8 months ago

    Reply
    Lots of information here. In a Google search, put
    site:forums.modx.com search words