X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fscripts%2Fpublic_html%2Fcommon.php;h=d56c9d40bf5b5d4b1eab1df4afb59737547c4048;hb=a7e618ad478e4203068668f5fe90e7985a1dc2c5;hp=0e7962abfae84b2aff4a64c1f9031dc2583e7258;hpb=0a2a17e3a4d180ff8a23ef4bd56a5d05f2a303aa;p=helm.git diff --git a/helm/software/matita/scripts/public_html/common.php b/helm/software/matita/scripts/public_html/common.php index 0e7962abf..d56c9d40b 100644 --- a/helm/software/matita/scripts/public_html/common.php +++ b/helm/software/matita/scripts/public_html/common.php @@ -50,7 +50,7 @@ function printer($q){ function query($q,$f) { $db = mysql_pconnect("localhost","helm"); mysql_select_db("matita"); - $q = preg_replace("/\n/"," ",$q); + $q = ltrim(rtrim(preg_replace("/\n/"," ",$q))); if (!preg_match("/^(select|describe)[^\n;]*;?$/i",$q)) { die("Query not allowed!
" . $q . ""); return;