Quotes changed when saving content block.

When I modify or add test to content blocks on my website, quotes and apostrophes have slashes added to them after the text block is saved. For example,

If I type or paste this: I'm going to test "the quotes."
and it becomes this I\'m going to test \"the quotes.\"

If I edit the text again without removing the extra slashes
then I get this: I\\\'m going to test \\\"the quotes.\\\"

The same issue appears to be wrecking inline image links so as to render the links unusable. Could anyone shed some light on this?

The website I"m working on:http://freedomandsocialorder.com/...
concrete5 Version 5.5.1

View Replies: View Best Answer
jero replied on at Permalink Best Answer Reply
At a rough guess something is up with you "magic quotes" setup.

I'd suggest you upload this php file into the root of your C5 install:


Run the script, and look for "magic_quotes_gpc" - it's most likely switched on, which might explain your issue.
aazide replied on at Permalink Reply
I did some further testing. It seems the issue affects quotes, double quotes and backslashes only. Slashes, colons, semicolons, hashes, ampersands, and similar characters are unaffected.
WHW1dotCOM replied on at Permalink Reply
Out of curiosity, I tried it.
I was not able to reproduce the problem you described. With same version.
aazide replied on at Permalink Reply
Jero, your suggestion of looking into Magic_Quotes was spot-on.

I'm using a shared hosting account, so unfortunately I was unable to turn off Magic_Quotes using any of the common methods that I googled. In the end, I was able to contact the support staff at my hosting provider and have them turn off Magic_Quotes across my entire hosting account. Problem solved!

Thank you.
jero replied on at Permalink Reply
Cool. Glad you got it sorted. :)