From 1c5a00313b1d38ceb0cedfb0475f6f0e3090ecf4 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 12 Dec 2017 21:32:01 -0700 Subject: [PATCH] Minor adjustment on tags to allow comma separated/etc. --- core/file_entry.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/file_entry.js b/core/file_entry.js index 32903315..6edd7ef8 100644 --- a/core/file_entry.js +++ b/core/file_entry.js @@ -528,8 +528,8 @@ module.exports = class FileEntry { } if(filter.tags && filter.tags.length > 0) { - // build list of quoted tags; filter.tags comes in as a space separated values - const tags = filter.tags.split(' ').map( tag => `"${tag}"` ).join(','); + // build list of quoted tags; filter.tags comes in as a space and/or comma separated values + const tags = filter.tags.replace(/,/g, ' ').replace(/\s{2,}/g, ' ').split(' ').map( tag => `"${tag}"` ).join(','); appendWhereClause( `f.file_id IN (