mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user