Initial commit
This commit is contained in:
18
lotgd-web/lotgd/lib/safeescape.php
Executable file
18
lotgd-web/lotgd/lib/safeescape.php
Executable file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
// addnews ready
|
||||
// translator ready
|
||||
// mail ready
|
||||
function safeescape($input){
|
||||
$prevchar="";
|
||||
$out="";
|
||||
for ($x=0;$x<strlen($input);$x++){
|
||||
$char = substr($input,$x,1);
|
||||
if (($char=="'" || $char=='"') && $prevchar!="\\"){
|
||||
$char="\\$char";
|
||||
}
|
||||
$out.=$char;
|
||||
$prevchar=$char;
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user