Template editor adds a "\" when saving templates
Posted: Tue Sep 08, 2009 10:25 pm
Hi,
I have recently started having problems with '\'s appearing in module templates after they have been saved. Happens in News and RSS2HTML modules. Searching the forums I found that the problem was that magic_quotes_gpc was set to on in my installation but I have no way of changing that since putting directives into .htaccess files does not work.
As this has only just started happening and I have not changed hosts etc, just upgraded cmsms I decided to look for a reason in the cmsms code.
It seems to be due to some commented out code in misc.functions.php. The my_htmlentities() function has these lines commented out...
//if ( get_magic_quotes_gpc() )
//{
// $val = stripslashes($val);
//}
If I remove the comments the problem goes away. The same lines have been commented out in the cms_utf8entities() function too.
Is there any reason why these lines have been commented out?
Ray
I have recently started having problems with '\'s appearing in module templates after they have been saved. Happens in News and RSS2HTML modules. Searching the forums I found that the problem was that magic_quotes_gpc was set to on in my installation but I have no way of changing that since putting directives into .htaccess files does not work.
As this has only just started happening and I have not changed hosts etc, just upgraded cmsms I decided to look for a reason in the cmsms code.
It seems to be due to some commented out code in misc.functions.php. The my_htmlentities() function has these lines commented out...
//if ( get_magic_quotes_gpc() )
//{
// $val = stripslashes($val);
//}
If I remove the comments the problem goes away. The same lines have been commented out in the cms_utf8entities() function too.
Is there any reason why these lines have been commented out?
Ray