From 24c7370ce742ba677507a24f8dd1e0977b399c55 Mon Sep 17 00:00:00 2001 From: Diana Shkolnikov Date: Tue, 24 May 2016 16:34:19 -0400 Subject: [PATCH] Add categories sanitizer to autocomplete --- sanitiser/autocomplete.js | 1 + test/unit/sanitiser/autocomplete.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sanitiser/autocomplete.js b/sanitiser/autocomplete.js index 8ab6fd9c..66bc0802 100644 --- a/sanitiser/autocomplete.js +++ b/sanitiser/autocomplete.js @@ -12,6 +12,7 @@ var sanitizeAll = require('../sanitiser/sanitizeAll'), sources_and_layers: require('../sanitiser/_sources_and_layers'), private: require('../sanitiser/_flag_bool')('private', false), geo_autocomplete: require('../sanitiser/_geo_autocomplete'), + categories: require('../sanitiser/_categories') }; var sanitize = function(req, cb) { sanitizeAll(req, sanitizers, cb); }; diff --git a/test/unit/sanitiser/autocomplete.js b/test/unit/sanitiser/autocomplete.js index 186cb4b6..6581c689 100644 --- a/test/unit/sanitiser/autocomplete.js +++ b/test/unit/sanitiser/autocomplete.js @@ -6,7 +6,7 @@ module.exports.tests.sanitisers = function(test, common) { test('check sanitiser list', function (t) { var expected = [ 'singleScalarParameters', 'text', 'tokenizer', 'size', 'layers', 'sources', - 'sources_and_layers', 'private', 'geo_autocomplete' + 'sources_and_layers', 'private', 'geo_autocomplete', 'categories' ]; t.deepEqual(Object.keys(autocomplete.sanitiser_list), expected); t.end();