From: Claudio Sacerdoti Coen Date: Tue, 4 Feb 2003 12:14:03 +0000 (+0000) Subject: Bug fixed: "'" must be quoted. X-Git-Tag: V_0_0_4_1~63 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=7c1f922d7f3b4f6538892eb4a96c9fa6e33fac0a;p=helm.git Bug fixed: "'" must be quoted. --- diff --git a/helm/ocaml/mathql_interpreter/pattern.ml b/helm/ocaml/mathql_interpreter/pattern.ml index 5fddf5729..9809552a0 100644 --- a/helm/ocaml/mathql_interpreter/pattern.ml +++ b/helm/ocaml/mathql_interpreter/pattern.ml @@ -38,7 +38,10 @@ let rec pattern_ex l = [] -> [] | s::tl -> let result = let c = pgc () in - let qq = "select uri from registry where uri ~ '" ^ s ^ "' order by registry.uri asc" in + let quoted_s = + Str.global_substitute (Str.regexp "'") + (function _ -> "\\'") s in + let qq = "select uri from registry where uri ~ '" ^ quoted_s ^ "' order by registry.uri asc" in let res = c#exec (qq) in List.map (function uri -> (List.hd uri,[])) res#get_list (*for i = 0 to res#ntuples do