diff options
Diffstat (limited to 'src/web/helpers/sanitize.php')
-rw-r--r-- | src/web/helpers/sanitize.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/web/helpers/sanitize.php b/src/web/helpers/sanitize.php new file mode 100644 index 0000000..5d37852 --- /dev/null +++ b/src/web/helpers/sanitize.php @@ -0,0 +1,8 @@ +<?php /* Copyright (c) 2024 Freya Murphy */ + +function esc($data) { + $data = str_replace('&', '&', $data); + $data = str_replace('<', '<', $data); + $data = str_replace('>', '>', $data); + return $data; +} |