[Groonga-commit] nroonga/norema [master] Escape facet specification

Back to archive index

Yoji SHIDARA null+****@clear*****
Tue Aug 21 17:34:35 JST 2012


Yoji SHIDARA	2012-08-21 17:34:35 +0900 (Tue, 21 Aug 2012)

  New Revision: 54367d193ed1e656af370e4b2affb9dcad4fc549
  https://github.com/nroonga/norema/commit/54367d193ed1e656af370e4b2affb9dcad4fc549

  Log:
    Escape facet specification

  Modified files:
    lib/server.js

  Modified: lib/server.js (+3 -1)
===================================================================
--- lib/server.js    2012-08-21 17:26:56 +0900 (855509a)
+++ lib/server.js    2012-08-21 17:34:35 +0900 (823676f)
@@ -83,7 +83,9 @@ app.get('/search', function(request, response, next) {
   };
 
   if (request.query.in) {
-    var facetSpecified = request.query.in;
+    var facetSpecified = request.query.in.replace('\\', '\\\\');
+    var escaped = facetSpecified.replace('\\', '\\\\').replace("'", "\\'");
+
     options.bq = "path:'" + facetSpecified + "'"
   }
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index