diff --git a/html/inc/util.inc b/html/inc/util.inc
index 5de5f54d81..f112aeb7b9 100644
--- a/html/inc/util.inc
+++ b/html/inc/util.inc
@@ -614,6 +614,9 @@ function get_str($name, $optional=false) {
if (!$x && !$optional) {
error_page("missing or bad parameter: $name");
}
+ if (get_magic_quotes_gpc() == 0) {
+ $x = addslashes($x);
+ }
return $x;
}
@@ -632,6 +635,9 @@ function post_str($name, $optional=false) {
if (!$x && !$optional) {
error_page("missing or bad parameter: $name");
}
+ if (get_magic_quotes_gpc() == 0) {
+ $x = addslashes($x);
+ }
return $x;
}