<![CDATA[ MODx escaping apostrophes in snippets! - My Forums]]> https://forums.modx.com/thread/?thread=16464 <![CDATA[Re: MODx escaping apostrophes in snippets!]]> https://forums.modx.com/thread/16464/modx-escaping-apostrophes-in-snippets#dis-post-88896 Everettg_99 Jul 05, 2011, 05:19 PM https://forums.modx.com/thread/16464/modx-escaping-apostrophes-in-snippets#dis-post-88896 <![CDATA[Re: MODx escaping apostrophes in snippets!]]> https://forums.modx.com/thread/16464/modx-escaping-apostrophes-in-snippets#dis-post-88895 http://www.php.net/manual/en/security.magicquotes.disabling.php]]> BobRay Jan 18, 2010, 09:24 PM https://forums.modx.com/thread/16464/modx-escaping-apostrophes-in-snippets#dis-post-88895 <![CDATA[Re: MODx escaping apostrophes in snippets!]]> https://forums.modx.com/thread/16464/modx-escaping-apostrophes-in-snippets#dis-post-88894 lindani Jan 18, 2010, 03:34 PM https://forums.modx.com/thread/16464/modx-escaping-apostrophes-in-snippets#dis-post-88894 <![CDATA[MODx escaping apostrophes in snippets!]]> https://forums.modx.com/thread/16464/modx-escaping-apostrophes-in-snippets#dis-post-88893
I am was absolutely stumped about MODx escaping simple apostrophes in snippets. If you submitted this:

$test=’hello’;

10 times, it would read:

$test=///////////////////////////’hello////////////////////////’;

This happened after I upgrade the server to Apache 2.2. Apparently on this cPanel machine, the PHP preference magic_quote_gpc is enabled by default, which causes all mySQL submissions to be escaped, rendering your snippet code destroyed.

I’m just posting here in case anyone else has the same problem. Setting magic_quotes_gpc to off solves it.

Best,

Per
]]>
perholmes Jan 18, 2010, 02:55 PM https://forums.modx.com/thread/16464/modx-escaping-apostrophes-in-snippets#dis-post-88893