From 1073c96eee894b6cdf227df06097ecb89c3e59ef Mon Sep 17 00:00:00 2001 From: Perception Date: Thu, 7 Jan 2021 15:59:56 -0800 Subject: [PATCH] Add single-quote to dangerous chars --- routes/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/search.js b/routes/search.js index a792fc9..fffc96f 100644 --- a/routes/search.js +++ b/routes/search.js @@ -16,7 +16,7 @@ const PER_PAGE = 100 */ function safeQuery(q) { let q2 = q.trim() - if (q2.match(/[-./]/)) { + if (q2.match(/[-./']/)) { q2 = `"${q2}"` } if (q2.match(/\+/)) {