From 8d1b1cdb775934468076dd7ef7cafaf9a95d9b25 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Wed, 22 Aug 2018 13:33:45 +0000 Subject: [PATCH] remove leading/trailing white-space before evaluating input's likeliness --- icedeb.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/icedeb.js b/icedeb.js index b9e8460..0d6676b 100644 --- a/icedeb.js +++ b/icedeb.js @@ -180,6 +180,9 @@ function check_likely_inputs(q) { el.classList.remove('likely'); }); + q = q.replace(/^\s+/, ''); + q = q.replace(/\s+$/, ''); + if ( /^#?\d+$/.test(q) || /^CVE-/.test(q) ) cnt.add('like-b'); -- 2.39.5