Apostophe changes to \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'

Just noticed on some of my events that once saved the text gets screwed up if you use an apostrophe anywhere it adds \\ like below

I read in another thread about magic quotes being enabled
My Phpinfo says it is .
Configure Command
’ ‘–enable-magic-quotes’
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off

So is there any fix for this without turning Magic Quotes off as I am on a hosted server running a few sites . One in particular needs magic quotes on .
Running
Apache version 2.2.17
PHP version 5.2.15
So How do I fix this without disabling magic quotes??

You can try to add the next code snippet at start of
event-calendar-scheduler\codebase\dhtmlxSchedulerConfiguratorLoad.php

if (get_magic_quotes_gpc()) { $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); while (list($key, $val) = each($process)) { foreach ($val as $k => $v) { unset($process[$key][$k]); if (is_array($v)) { $process[$key][stripslashes($k)] = $v; $process[] = &$process[$key][stripslashes($k)]; } else { $process[$key][stripslashes($k)] = stripslashes($v); } } } unset($process); }

Yep…Thanks Stanislav … That worked :smiley:
Although I am using the Joomla plug-in which was the
components/com_scheduler/codebase/dhtmlxSchedulerConfigurator.php
File
I’m a happy man lol!

I added this same code (WordPress) to the file suggested in this post and it always adds a “” right in front of the apostrophe. If I edit the description and leave the backslash as is, save it another backslash appears. :confused:

and it always adds a “” right in front of the apostrophe
Maybe some specific db settings, not quite sure
Normally the magic quotes is the only thing which can cause such result.

Does not work for me as well in WP. Any help will be highly appreciated.

FOund a workaround of this problem for WP

In /wp-content/plugins/event-calendar-scheduler/codebase/connector/db_common.php

go to line 567 and replace with below.

public function escape($data){
//return mysql_real_escape_string($data);
return $data;
}

Hope this helps.