Are you using the latest version 0.9.8.6 – earlier versions of the plugin did not handle apostrophes and quotes correctly, the latest version does (or at least it should). If you are using the latest version, please be specific as to which field(s) are not properly escaping the apostrophe.
Thanks
Eran
Thank you for your quick response Eran.
I’m using the version 0.9.8.6.
All the fields seem not to escape the apostrophe.
Best regards
EDIT : my WP is in French : may it be the cause of this problem ?
It shouldn’t be…but I will look into this.
Thanks,
Eran
I just tested this combination in my local version of the plugin and I see no backslashes. I can create and update events with Editer l’évènement in the text and I have no problems.
What is your url?
Eran
I’ve just send an email to you via your website.
Regards.
I was only able to replicate your problem by activating magic quotes gpc on my local server. Therefore, I believe the problem is that your php server has magic quotes gpc set.
To stop this from happening, edit your php.ini file (or ask your host to) and disable that setting. Here’s why the developers of PHP say it should no longer be used.
Eran
Hi Eran,
Your diagnostic was the good : it’s a problem of magic quotes.
Here a fix : paste the following code in functions.php of your theme :
<?php
if ( get_magic_quotes_gpc() ) {
$_POST = array_map( 'stripslashes_deep', $_POST );
$_GET = array_map( 'stripslashes_deep', $_GET );
$_COOKIE = array_map( 'stripslashes_deep', $_COOKIE );
$_REQUEST = array_map( 'stripslashes_deep', $_REQUEST );
}
?>
Thank you for your help, i’ve really appreciated !
Best regards
Glad I could help!
Thanks for posting your fix.
It’s important to note that while disabling magic quotes is the only way to avoid the apostrophe problem and a best coding practice, it can adversely affect php code (such as older plugins) that rely on that functionality.
Eran
Hi Eran,
First of all, I LOVE the calendar – it’s beautiful.
However, I’m having the \\ issue as well. I’m running version 0.9.9.2 and tried adding the code above to functions.php, but the \\ are still there. I also tried editing .htaccess and php.ini to remove magic quotes per your link to php.net, but neither of those edits fixed the issue (though I did check, and the server is running PHP 5.2.14). Any other thoughts?
I’ll look into it, but offhand I don’t have any other suggestions.
Thanks for your feedback.
Eran
While the solution that hurraken posted does indeed work, it creates other issues with urls. If your website is in the format http://www.example.com, then typing example.com will just give you a blank screen. I’m unsure of any other issues it can cause.
Eran’s suggestion of turning off Magic Quotes is the best solution and it can be as simple as editing the php.ini in your root directory (or the directory the WordPress is installed, depends). If there is no php.ini, then just make one. Add the line:
magic_quotes_gpc = Off
And it should work. It depends on your host really. If you have Bluehost, then just place it in your public_html folder, problem solved.
I’m having a similar issue, but it’s only switching out the apostrophe in the event title (everywhere else seems fine). I tried editing the php.ini file & adding the above php to the functions.php file …so far nothing has worked. Strange things.