From 0b10c30c798afcc0a9d3f02ebecd0f3ba2cf0652 Mon Sep 17 00:00:00 2001 From: Genaro Contreras Gutierrez Date: Tue, 30 Jul 2019 08:49:41 -0700 Subject: [PATCH] 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 --- lib/functions.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/functions.php b/lib/functions.php index 1f1e48c..6e223b1 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -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. */