Jump to content

Archived

This topic is now archived and is closed to further replies.

mikeschuld

Very Specific Magic Quotes Question

Recommended Posts

I am writing a tab manager for my site that essentially has a textarea for code input and a textbox for the tab title and the scripts auto add tabs and their panels to be shown and hidden. My problem is that when I enter php code into the textarea (or html for that matter) my quotes are being \" because of magic quotes.

This would not normally be that much of a problem, since I can just turn off magic quotes, but some of the php I have is also needing those quotes (ex. print("some random stuff \"kicks\" butt."); ) to be kept in there, and they are converted back to the normal quote character essentially breaking the php and not allowing the tab to run all the way.

I wrote my own stripslashes to go in and replace certain quotes that I know will be incorrectly converted, but I just can't seem to get them all to work all the time. Is there any solution for this that you know of?

Share this post


Link to post
Share on other sites
take a look at addslashes(), stripslashes(), addcslashes(), stripsslashes() in the php function manual.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.