Don't turn '0' into ''
parent
4012a243ac
commit
c58e63e927
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue