From: Damyan Ivanov Date: Wed, 22 Aug 2018 13:33:45 +0000 (+0000) Subject: remove leading/trailing white-space before evaluating input's likeliness X-Git-Tag: 2.2~8 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=8d1b1cdb775934468076dd7ef7cafaf9a95d9b25;p=icedeb.git remove leading/trailing white-space before evaluating input's likeliness --- 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');