Navigation Menu

Skip to content

Commit

Permalink
Correctly use the escaped query
Browse files Browse the repository at this point in the history
  • Loading branch information
darashi committed Aug 22, 2012
1 parent 567fd1b commit 3553e36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/server.js
Expand Up @@ -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);
Expand Down

0 comments on commit 3553e36

Please sign in to comment.