aboutsummaryrefslogtreecommitdiff
path: root/src/globals.php
diff options
context:
space:
mode:
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);