From d35da891bedb9354e5d0d7e02c5f27d57284cfe5 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 4 Jan 2022 18:10:59 +0200 Subject: [PATCH] whitelist new chars --- src/system/helper/filter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/helper/filter.php b/src/system/helper/filter.php index bf40b3d..e8b85d1 100644 --- a/src/system/helper/filter.php +++ b/src/system/helper/filter.php @@ -68,7 +68,7 @@ class Filter { public static function bio(string $string) { - $string = preg_replace('/[^\s\w\.\,\:\;\@\#\=\-\_\~\*\/\(\)\[\]\<\>\"\']+/u', '', $string); + $string = preg_replace('/[^\s\w\.\,\:\;\@\?\!\+\`\&\^\%\#\=\-\_\~\*\/\(\)\[\]\<\>\"\']+/u', '', $string); $string = mb_substr($string, 0, 500); @@ -77,7 +77,7 @@ class Filter { public static function post(string $string) { - $string = preg_replace('/[^\s\w\.\,\:\;\@\#\=\-\_\~\*\/\(\)\[\]\<\>\"\']+/u', '', $string); + $string = preg_replace('/[^\s\w\.\,\:\;\@\?\!\+\`\&\^\%\#\=\-\_\~\*\/\(\)\[\]\<\>\"\']+/u', '', $string); $string = mb_substr($string, 0, 140);