Don't turn '0' into ''

pull/3551/head
Isaac Connor 2022-06-06 13:53:33 -04:00
parent 4012a243ac
commit c58e63e927
1 changed files with 3 additions and 3 deletions

View File

@ -2011,19 +2011,19 @@ function validNum( $input ) {
// For general strings
function validStr($input) {
if(!$input) return '';
if (is_null($input)) return '';
return strip_tags($input);
}
// For strings in javascript or tags etc, expected to be in quotes so further quotes escaped rather than converted
function validJsStr($input) {
if(!$input) return '';
if (is_null($input)) return '';
return strip_tags(addslashes($input));
}
// For general text in pages outside of tags or quotes so quotes converted to entities
function validHtmlStr($input) {
if(!$input) return '';
if (is_null($input)) return '';
return htmlspecialchars($input, ENT_QUOTES);
}