aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/input.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/engine/lib/input.php b/engine/lib/input.php
index e6929f6c0..e200f8866 100644
--- a/engine/lib/input.php
+++ b/engine/lib/input.php
@@ -15,9 +15,10 @@
* Get some input from variables passed on the GET or POST line.
*
* @param $variable string The variable we want to return.
- * @param $default mixed A default value for the variable if it is not found.
+ * @param $default mixed A default value for the variable if it is not found.
+ * @param $filter_result If true then the result is filtered for bad tags.
*/
- function get_input($variable, $default = "")
+ function get_input($variable, $default = "", $filter_result = true)
{
if (isset($_REQUEST[$variable])) {
@@ -27,12 +28,15 @@
} else {
$var = trim($_REQUEST[$variable]);
}
-
- global $CONFIG;
- if (@include_once(dirname(dirname(dirname(__FILE__)))) . "/vendors/kses/kses.php") {
- $var = kses($var, $CONFIG->allowedtags);
+
+ if ($filter_result)
+ {
+ global $CONFIG;
+ if (@include_once(dirname(dirname(dirname(__FILE__)))) . "/vendors/kses/kses.php") {
+ $var = kses($var, $CONFIG->allowedtags);
+ }
}
-
+
return $var;
}