Navigation Menu

Skip to content

Commit

Permalink
Escape facet specification
Browse files Browse the repository at this point in the history
  • Loading branch information
darashi committed Aug 21, 2012
1 parent 2c3d734 commit 54367d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/server.js
Expand Up @@ -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 + "'"
}

Expand Down

0 comments on commit 54367d1

Please sign in to comment.