Started integrating external systems
This commit is contained in:
+3
-10
@@ -2,7 +2,7 @@
|
||||
/*****************************************************************************
|
||||
IP Reg, a PHP/MySQL IPAM tool
|
||||
Copyright (C) 2007-2009 Wietse Warendorff (up to v0.5)
|
||||
Copyright (C) 2011-2023 Thomas Hooge
|
||||
Copyright (C) 2011-2026 Thomas Hooge
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*****************************************************************************/
|
||||
@@ -11,22 +11,15 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
function sanitize($input) {
|
||||
global $dblink;
|
||||
|
||||
// trim whitespaces
|
||||
$input = @trim($input);
|
||||
|
||||
// magic quotes enabled?
|
||||
if(get_magic_quotes_gpc()) {
|
||||
// strip slashes
|
||||
$input = stripslashes($input);
|
||||
}
|
||||
$input = stripslashes($input);
|
||||
|
||||
// convert to utf-8
|
||||
iconv("UTF-8", "UTF-8", $input);
|
||||
|
||||
// convert special chars
|
||||
$input = htmlentities($input,ENT_QUOTES,'UTF-8');
|
||||
$input = htmlentities($input, ENT_QUOTES, 'UTF-8');
|
||||
|
||||
// and return
|
||||
return $input;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user