Template editor adds a "\" when saving templates

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
raymondo
Forum Members
Forum Members
Posts: 18
Joined: Sun Feb 11, 2007 10:23 pm

Template editor adds a "\" when saving templates

Post by raymondo »

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
Last edited by raymondo on Tue Sep 08, 2009 10:27 pm, edited 1 time in total.
Pierre M.

Re: Template editor adds a "\" when saving templates

Post by Pierre M. »

System Info ?
raymondo
Forum Members
Forum Members
Posts: 18
Joined: Sun Feb 11, 2007 10:23 pm

Re: Template editor adds a "\" when saving templates

Post by raymondo »

Pierre M. wrote: System Info ?
Hi,

Sorry, it didn't seem to be relevent to the question but here is my system info...

----------------------------------------------

Cms Version: 1.6.5

Installed Modules:

•nuSOAP: 1.0.1
•MenuManager: 1.6.2
•ModuleManager: 1.3.1
•News: 2.10.3
•CMSMailer: 1.73.14
•Search: 1.6.1
•TinyMCE: 2.5.4
•FileManager: 1.0.1
•Printing: 1.0.3
•RSS2HTML: 1.2.2
•ThemeManager: 1.1.1
•FormBuilder: 0.5.1
•Quotes: 0.1.1
•PodcastManager: 0.6.1
•PodCast: 0.1
•CGExtensions: 1.9
•NMS: 2.2
•PageBlocks: 0.1.5
•Skeleton: 1.6


Config Information:

•php_memory_limit:
•process_whole_template: true
•max_upload_size: 50000000
•default_upload_permission: 664
•assume_mod_rewrite: false
•page_extension:
•internal_pretty_urls: true
•use_hierarchy: false


Php Information:

•phpversion: 5.2.8
•md5_function: On (True)
•gd_version: 2
•tempnam_function: On (True)
•magic_quotes_runtime: Off (False)
•memory_limit: 256M
•max_execution_time: 180
•safe_mode: Off (False)
•session_save_path: /tmp (1777)


Server Information:

•Server Api: cgi
•Server Db Type: MySQL (mysql)
•Server Db Version: 5.0.81


----------------------------------------------


Ray
Pierre M.

Re: Template editor adds a "\" when saving templates

Post by Pierre M. »

Sorry, I had misunderstood. As I'm not in the DevTeam I can answer your question. But rereading your post you seem to have a point.

If things are that reproducible in the latest release, please file a new bug report (with tiny patch) in the forge against the appropriate software piece (core or module). May be you only need to search there to find the issue is already reported.
Don't hesitate to elaborate on your hosting context (unix ? OS X? settings...) to help the DevTeam.

Pierre M.
Post Reply

Return to “CMSMS Core”