From 321609306d7ff0ed1b248d575d34f56b19551283 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Wed, 2 Feb 2022 02:18:33 +0100 Subject: [PATCH] Use strip tags in sanitize_text over deprecated FILTER_SANITIZE_STRING --- src/MD_STD_IN.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/MD_STD_IN.php b/src/MD_STD_IN.php index ffeb3e4..37c155c 100644 --- a/src/MD_STD_IN.php +++ b/src/MD_STD_IN.php @@ -73,13 +73,12 @@ final class MD_STD_IN { */ public static function sanitize_text(mixed $input):string { - $output = \filter_var($input, - FILTER_SANITIZE_STRING, - FILTER_FLAG_NO_ENCODE_QUOTES); + $output = \filter_var($input, FILTER_UNSAFE_RAW); if ($output === false) { return ""; } + $output = strip_tags($output); while (strpos($output, " ") !== false) { $output = str_replace(" ", " ", $output); }