Index: /branches/1.3/admin/edit.php
===================================================================
--- /branches/1.3/admin/edit.php	(revision 604)
+++ /branches/1.3/admin/edit.php	(revision 607)
@@ -12,9 +12,10 @@
 
 if ($_SERVER['REQUEST_METHOD'] == 'POST') {
-	xcache_set($name, $_POST['value']);
+	eval('$value = ' . $_POST['value']);
+	xcache_set($name, $value);
 	header("Location: xcache.php?type=" . XC_TYPE_VAR);
 	exit;
 }
-$value = xcache_get($name);
+$value = var_export(xcache_get($name), true);
 
 $xcache_version = XCACHE_VERSION;
Index: /branches/1.3/admin/common.php
===================================================================
--- /branches/1.3/admin/common.php	(revision 604)
+++ /branches/1.3/admin/common.php	(revision 607)
@@ -75,7 +75,28 @@
 }
 
+function stripaddslashes_array($value, $mqs = false)
+{
+	if (is_array($value)) {
+		foreach($value as $k => $v) {
+			$value[$k] = stripaddslashes_array($v, $mqs);
+		}
+	}
+	else if(is_string($value)) {
+		$value = $mqs ? str_replace('\'\'', '\'', $value) : stripslashes($value);
+	}
+	return $value;
+}
+
 error_reporting(E_ALL);
 ini_set('display_errors', 'On');
 define('REQUEST_TIME', time());
+
+if (get_magic_quotes_gpc()) {
+	$mqs = (bool) ini_get('magic_quotes_sybase');
+	$_GET = stripaddslashes_array($_GET, $mqs);
+	$_POST = stripaddslashes_array($_POST, $mqs);
+	$_REQUEST = stripaddslashes_array($_REQUEST, $mqs);
+}
+ini_set('magic_quotes_runtime', '0');
 
 $charset = "UTF-8";
Index: /branches/1.3/coverager/common.php
===================================================================
--- /branches/1.3/coverager/common.php	(revision 394)
+++ /branches/1.3/coverager/common.php	(revision 607)
@@ -75,7 +75,28 @@
 }
 
+function stripaddslashes_array($value, $mqs = false)
+{
+	if (is_array($value)) {
+		foreach($value as $k => $v) {
+			$value[$k] = stripaddslashes_array($v, $mqs);
+		}
+	}
+	else if(is_string($value)) {
+		$value = $mqs ? str_replace('\'\'', '\'', $value) : stripslashes($value);
+	}
+	return $value;
+}
+
 error_reporting(E_ALL);
 ini_set('display_errors', 'On');
 define('REQUEST_TIME', time());
+
+if (get_magic_quotes_gpc()) {
+	$mqs = (bool) ini_get('magic_quotes_sybase');
+	$_GET = stripaddslashes_array($_GET, $mqs);
+	$_POST = stripaddslashes_array($_POST, $mqs);
+	$_REQUEST = stripaddslashes_array($_REQUEST, $mqs);
+}
+ini_set('magic_quotes_runtime', '0');
 
 $charset = "UTF-8";
