https://www.icyphoenix.com/viewtopic.php?f=35&t=8315&p=54846#p54846
-----------------------------------
mort
Thu 29 Dec, 2011 21:19

Re: Images In Posts
-----------------------------------
I'm pretty sure Icy checks the status of magic_quotes_gpc before it adds slashes or not to prevent double-slashes etc.

And as I understand it magic_quotes_gpc wont exist in phpv6 and addslashes and stripslashes are to be deprecated and replaced with mysql_real_escape_string()


addslashes escapes: ', ", \, and NUL
mysql_real_escape_string escapes, in addition: \x00, \n, \r, and \x1a.

[b]Edit:[/b]

And as for checking Magic Quotes etc, it should look something like this.

stripslashes or addslashes

[code linenumbers=false]// escape variables
function escape($val){

	$val = trim($val);

	if(get_magic_quotes_gpc()) {
	$val = stripslashes($val);
	}
	 return mysql_real_escape_string($val);
}
[/code]



Or just turn them off altogether in Icy Script. ;)


