From 5d2c0800787e255d75ec2de0f3a334c2c75875d6 Mon Sep 17 00:00:00 2001 From: Heiko Hund Date: Sun, 4 Nov 2012 20:49:33 +0000 Subject: [PATCH] do not strip backslashes from script --- web/validate.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/validate.php b/web/validate.php index af81487..f8d83e7 100644 --- a/web/validate.php +++ b/web/validate.php @@ -38,7 +38,7 @@ function print_line($matches) { try { $parser = new Parser(); - $parser->parse(stripslashes($_POST['script'])); + $parser->parse($_POST['script']); $text_color = 'green'; $text = 'success'; @@ -53,11 +53,11 @@ function print_line($matches) print "Script to validate:
\n"; print ''."\n"; print preg_replace_callback("/^(.*)(\n|$)/Um", "print_line", - stripslashes(strtr($_POST['script'], array( + strtr($_POST['script'], array( ' ' => ' ', "\t" => '        ' )) - )); + ); print "
\n"; print 'Result: ' . $text ."\n
\n\n";