"What's new to the site?" shows up as "What\'s new to the site?".
Why is this? How can I prevent this?
How it is ran through the site:
$pagetitle = mysqli_real_escape_string ($mysqli, $pagetitle);
$pagetitle = cleansafelynow($pagetitle);
I did google this problem and nothing seemed to help me. It shows up fine when not going through mysqli_real_escape_string.
The function used:
function cleansafelynow($var) {
if (@get_magic_quotes_gpc()) {stripslashes($var);}
strip_tags($var);
htmlspecialchars($var, ENT_QUOTES);
return $var;
}
I also tried stripshlashes() alone and not going through the if statement and it remains the same. Is there something I can do to remove all backslashes possibly? Or maybe a different way to accomplish this?
magic_quotes_gpc, magic_quotes_runtime, and magic_quotes_sybase are all off.