diff options
| author | Cassio de Campos <cassiopc@gmail.com> | 2017-07-31 19:29:41 +0000 |
|---|---|---|
| committer | Cassio de Campos <cassiopc@gmail.com> | 2017-07-31 19:29:41 +0000 |
| commit | 00de0ce0817f36b5acba70362a4c30c8fa7aaf11 (patch) | |
| tree | a1212e95b472d75687741132d9055e416a558830 /src/globals.php | |
| parent | e90144b4cc0feba26ee2f972b032c44d187b6bff (diff) | |
| download | boca-00de0ce0817f36b5acba70362a4c30c8fa7aaf11.tar.gz boca-00de0ce0817f36b5acba70362a4c30c8fa7aaf11.zip | |
sanitising
Diffstat (limited to 'src/globals.php')
| -rwxr-xr-x | src/globals.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/globals.php b/src/globals.php index ded3ba2..8b7bfb0 100755 --- a/src/globals.php +++ b/src/globals.php @@ -107,6 +107,17 @@ function sanitizeText($text, $doamp=true) $text = addslashes($text); return $text; } +function sanitizeFilename($text) +{ + $text = str_replace("&", "", $text); + $text = str_replace("<", "", $text); + $text = str_replace(">", "", $text); + $text = str_replace("\"", "", $text); + $text = str_replace("'", "", $text); + $text = str_replace("`", "", $text); + $text = addslashes($text); + return $text; +} function unsanitizeText($text) { $text = str_replace("&", "&", $text); |