Fixed function santizeInput to trim tags first then trim trailing white space because if you added a tag at the end it would create a space more

This commit is contained in:
johnnyq
2023-02-16 15:08:06 -05:00
parent 56e0c7d30b
commit 995121e532
2 changed files with 10 additions and 9 deletions

View File

@@ -628,12 +628,13 @@ function checkFileUpload($file, $allowed_extensions)
function sanitizeInput($input) {
global $mysqli;
// Remove white space from beginning and end of input
$input = trim($input);
// Remove HTML and PHP tags
$input = strip_tags($input);
// Remove white space from beginning and end of input
$input = trim($input);
// Escape special characters
$input = mysqli_real_escape_string($mysqli, $input);