]> git.ktnx.net Git - icedeb.git/commitdiff
remove leading/trailing white-space before evaluating input's likeliness
authorDamyan Ivanov <dmn@debian.org>
Wed, 22 Aug 2018 13:33:45 +0000 (13:33 +0000)
committerDamyan Ivanov <dmn@debian.org>
Wed, 22 Aug 2018 13:33:45 +0000 (13:33 +0000)
icedeb.js

index b9e8460c89ce92cf118f867a4d57abe03f75a3ec..0d6676b5e4e9d49581548b22975e7da491adf9b9 100644 (file)
--- 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');