]> git.ktnx.net Git - icedeb.git/blobdiff - icedeb.js
trim leading hash sign
[icedeb.git] / icedeb.js
index 26ea6cf11146fa9eb9adab0d52512e73a7f22a68..b9e8460c89ce92cf118f867a4d57abe03f75a3ec 100644 (file)
--- a/icedeb.js
+++ b/icedeb.js
@@ -30,6 +30,7 @@ function trim(word) {
     word = word.replace(/^[^a-zA-Z0-9]+/, '');
     word = word.replace(/[^a-zA-Z0-9]+$/, '');
     word = word.replace(/^Bug#/i, '');
+    word = word.replace(/^#/, '');
   } while ( oldword != word );
 
   return word;
@@ -179,7 +180,7 @@ function check_likely_inputs(q) {
         el.classList.remove('likely');
     });
 
-  if ( /^\d+$/.test(q) || /^CVE-/.test(q) )
+  if ( /^#?\d+$/.test(q) || /^CVE-/.test(q) )
     cnt.add('like-b');
 
   if ( /^[a-z0-9][a-z0-9\-+.]+$/.test(q) )