From d630b7727085ae9a190f2dea9b249ac1b0d6140b Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 17 Oct 2011 10:58:36 +0200 Subject: [PATCH] Handle setups with magic quotes enabled --- index.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.php b/index.php index 841dc31..58dc62f 100644 --- a/index.php +++ b/index.php @@ -35,6 +35,10 @@ $debugOutput = ''; if (isset($_POST['code'])) { $code = $_POST['code']; + if (get_magic_quotes_gpc()) { + $code = stripslashes($code); + } + // if there's only one line wrap it into a krumo() call if (preg_match('#^(?!var_dump|echo|print|< )([^\r\n]+?);?\s*$#is', $code, $m) && trim($m[1])) { $code = 'krumo('.$m[1].');';