cql_quote() encloses strings that contain backslash in quotes.
authorMike Taylor <mike@indexdata.com>
Thu, 20 Dec 2012 12:40:23 +0000 (12:40 +0000)
committerMike Taylor <mike@indexdata.com>
Thu, 20 Dec 2012 12:40:23 +0000 (12:40 +0000)
lib/ZOOM/IRSpy/Utils.pm

index 53e53fc..0583662 100644 (file)
@@ -163,7 +163,7 @@ sub cql_quote {
     my($term) = @_;
 
     $term =~ s/([""\\*?])/\\$1/g;
-    $term = qq["$term"] if $term =~ /[\s""\/]/;
+    $term = qq["$term"] if $term =~ /[\s""\/\\]/;
     return $term;
 }
 
@@ -180,8 +180,7 @@ sub cql_target {
        $id = $protocol;
     }
 
-    return "rec.id=" . cql_quote($id);
-    #return "rec.id_raw=" . cql_quote($id);
+    return "rec.id==" . cql_quote($id);
 }