other usage of function preventXSS

Other example of usage:
preventXSS(get_request('cmd','REQUEST'))

Additionally, the $ preventXSS parameter of the get_request function can set the default to true and in the specific fields set the parameter to false
This commit is contained in:
Genaro Contreras Gutierrez 2019-07-30 08:49:41 -07:00 committed by GitHub
parent c22c98c463
commit 0b10c30c79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -683,14 +683,13 @@ function get_request($attr,$type='POST',$die=false,$default=null,$preventXSS=fal
return $value;
}
/**
* Prevent XSS function
*
* Prevent XSS function. This function can usage has preventXSS(get_request('cmd','REQUEST'))
* Return valor escape XSS.
*/
function preventXSS($value){
return htmlspecialchars(addslashes($value), ENT_QUOTES, 'UTF-8');
}
* Record a system message.
* This function can be used as an alternative to generate a system message, if page hasnt yet been defined.
*/