diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-06-15 22:10:15 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-06-15 22:10:15 +0300 |
| commit | 7d5e7b0f95992650189b73c6160264db6b658bde (patch) | |
| tree | b5e4229ed2119bcfc0b59cf3f634fd8fa503cf0c /include | |
| parent | a15fe2d871772c78cacce00530211c391d52508e (diff) | |
| download | the-epube-7d5e7b0f95992650189b73c6160264db6b658bde.tar.gz the-epube-7d5e7b0f95992650189b73c6160264db6b658bde.tar.xz | |
import request with split methods and generate some tests
Diffstat (limited to 'include')
| -rw-r--r-- | include/common.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/common.php b/include/common.php index 12753c8..684d9c6 100644 --- a/include/common.php +++ b/include/common.php @@ -32,3 +32,16 @@ return ""; } + + /** + * This is used for user http parameters unless HTML code is actually needed. + */ + function clean(mixed $param): mixed { + if (is_array($param)) { + return array_map("trim", array_map("strip_tags", $param)); + } else if (is_string($param)) { + return trim(strip_tags($param)); + } else { + return $param; + } + } |
