handle various functions no longer dealing with null
parent
553c79d8f9
commit
7c0dcfcefc
|
@ -1959,16 +1959,19 @@ function validNum( $input ) {
|
|||
|
||||
// For general strings
|
||||
function validStr($input) {
|
||||
if(!$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 '';
|
||||
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 '';
|
||||
return htmlspecialchars($input, ENT_QUOTES);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue