From 56336ee3d5ec32647f6dbf35cf09f94a13795b60 Mon Sep 17 00:00:00 2001 From: Connor Thomson Date: Sat, 19 Sep 2026 10:51:36 -0700 Subject: Random fixes and updates --- php/path-clean.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 php/path-clean.php (limited to 'php/path-clean.php') diff --git a/php/path-clean.php b/php/path-clean.php new file mode 100644 index 0000000..d7b5fbf --- /dev/null +++ b/php/path-clean.php @@ -0,0 +1,25 @@ +. + */ + +function path_clean($path) { + $pattern = '/(\.\.\/)+/'; + return preg_replace($pattern, '', $path); +} + +?> -- cgit v1.2.3