X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fscripts%2Fpublic_html%2Fcommon.php;h=d56c9d40bf5b5d4b1eab1df4afb59737547c4048;hb=1776f357e1a69fa1133956660b65d7bafdfe5c25;hp=0e7962abfae84b2aff4a64c1f9031dc2583e7258;hpb=fd304e9920881a9b0f7b4304be16bdb9892195cc;p=helm.git diff --git a/matita/scripts/public_html/common.php b/matita/scripts/public_html/common.php index 0e7962abf..d56c9d40b 100644 --- a/matita/scripts/public_html/common.php +++ b/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;