Auto character escaping?

Status
Not open for further replies.

xevell

Member
Messages
39
Reaction score
0
Points
6
Hello,

I wasnt sure if this post would go here but I tried looking up and couldnt find much.

Well my question is simple, I wonder if the server have some sort of auto dangerous character escaping feature. Because I've been working on some application that when I tried I have putted some words like isn't or don't and when I output those characters straight from the form they come like don\'t and isn\'t. So I was wondering if the server have that functionality build in.

Thanks in advance,
Vic.
 

gomarc

Member
Messages
516
Reaction score
18
Points
18
Yes, you are correct. PHP magic_quotes is set to on by default. To echo your string, you can use the PHP stripslashes() function.

PHP:
<?php
$str = "Is your name O\'reilly?";

// Outputs: Is your name O'reilly?
echo stripslashes($str);
?>

Source: Example #1 A stripslashes() example
 

xevell

Member
Messages
39
Reaction score
0
Points
6
The same thing if like rather than output I send that message into an email, will it come with the slashes?
 
Status
Not open for further replies.
Top