[Groonga-commit] nroonga/norema [master] Correctly use the escaped query

Back to archive index

Yoji SHIDARA null+****@clear*****
Wed Aug 22 13:54:07 JST 2012


Yoji SHIDARA	2012-08-22 13:54:07 +0900 (Wed, 22 Aug 2012)

  New Revision: 3553e367ac2847ccc95c71ee4cddfa6151274d01
  https://github.com/nroonga/norema/commit/3553e367ac2847ccc95c71ee4cddfa6151274d01

  Log:
    Correctly use the escaped query

  Modified files:
    lib/server.js

  Modified: lib/server.js (+2 -2)
===================================================================
--- lib/server.js    2012-08-21 18:05:26 +0900 (823676f)
+++ lib/server.js    2012-08-22 13:54:07 +0900 (8b4609a)
@@ -83,10 +83,10 @@ app.get('/search', function(request, response, next) {
   };
 
   if (request.query.in) {
-    var facetSpecified = request.query.in.replace('\\', '\\\\');
+    var facetSpecified = request.query.in;
     var escaped = facetSpecified.replace('\\', '\\\\').replace("'", "\\'");
 
-    options.bq = "path:'" + facetSpecified + "'"
+    options.bq = "path:'" + escaped + "'"
   }
 
   console.log('SEARCH', options);
-------------- next part --------------
HTML����������������������������...
下載 



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