aboutsummaryrefslogtreecommitdiff
path: root/src/globals.php
diff options
context:
space:
mode:
authorCassio de Campos <cassiopc@gmail.com>2017-07-31 19:29:41 +0000
committerCassio de Campos <cassiopc@gmail.com>2017-07-31 19:29:41 +0000
commit00de0ce0817f36b5acba70362a4c30c8fa7aaf11 (patch)
treea1212e95b472d75687741132d9055e416a558830 /src/globals.php
parente90144b4cc0feba26ee2f972b032c44d187b6bff (diff)
downloadboca-00de0ce0817f36b5acba70362a4c30c8fa7aaf11.tar.gz
boca-00de0ce0817f36b5acba70362a4c30c8fa7aaf11.zip
sanitising
Diffstat (limited to 'src/globals.php')
-rwxr-xr-xsrc/globals.php11
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("&amp;", "&", $text);