Subversion Repositories ALCASAR

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
610 stephane 1
<?php
2
/*
3
All functions have the al_ (for alcasar) prefix 
4
*/
5
function al_escape($str){
6
	if(!empty($str) && is_string($str)) {
7
		if (get_magic_quotes_gpc()) {
8
			$str = stripslashes(str);
9
		}
10
		$search=array("\\","\0","\n","\r","\x1a","'",'"');
11
		$replace=array("\\\\","\\0","\\n","\\r","\Z","\'",'\"');
12
		return str_replace($search,$replace,$str);
13
	}
14
}
15
?>