View Full Version : Help me get rid of \' and \" these PLEASE!
Sscotties
11-12-2002, 11:56 PM
Hi, I've put together some bulletin board - forum pages and published them nad they're great - I'm a huge PHP fan at the moment. It does it for me, with manageable code I can understand.
Trouble is the rendering of the underscore characters is really quite annoying and it gives it a bit of an amateurish tone.
So, please and pretty please - what is the cure for this?
craigh@mac.com
11-13-2002, 01:45 AM
from your title, you don't refer to underscore characters, so I don't understand the question... If you are have trouble with slashes being added to your text, then use the stripslashes function. If the problem is underscores, then you need to be more specific in your question. Give an example or something.
Sscotties
11-13-2002, 12:28 PM
It happens when the client uses the " or the ' in their posts so if I was my own client and I wrote;-
What does 'multi-media' mean? - it would be rendered on the page as;-
What does \'multi-media\' mean?
I will look up the expression strip_slashes, but as I don't want to lose the '/' - slash sign. Can I do something like;-
<pre>
$leave = "/";
$userData = strip_slashes($userData, $leave);
</pre>
Would that work?
Simon
craigh@mac.com
11-13-2002, 01:16 PM
do some leg work... http://www.php.net/strip_slashes
Sscotties
11-13-2002, 04:31 PM
Yeah, sorted thanx - it was just the regular expression 'stripslashes' that I was missing
- thanx for your help
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.