Update functions.php (#5137)
This commit is contained in:
parent
ebb075bc4f
commit
bdd5a01e2a
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
|
|
@ -1921,7 +1921,15 @@ function number_pad($number,$n) {
|
||||||
|
|
||||||
//escape user data
|
//escape user data
|
||||||
function escape($string) {
|
function escape($string) {
|
||||||
return htmlentities($string, ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
if (is_array($string)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
elseif (isset($string) && strlen($string)) {
|
||||||
|
return htmlentities($string, ENT_QUOTES | ENT_HTML5, 'UTF-8');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
//return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
|
//return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue