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:
parent
c22c98c463
commit
0b10c30c79
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user