summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2017-11-02 13:53:52 +0100
committerLars-Dominik Braun <lars@6xq.net>2017-11-02 13:53:52 +0100
commit9fbf88661140cade527abfbf0d02c643504c579e (patch)
treeb308bfe8aeb586e3ff0af7ecda30f01b2522ebaf
parent25c120d01c8d133ad8b481941de2ebbadf373f4e (diff)
downloadcomatose-9fbf88661140cade527abfbf0d02c643504c579e.tar.gz
comatose-9fbf88661140cade527abfbf0d02c643504c579e.tar.bz2
comatose-9fbf88661140cade527abfbf0d02c643504c579e.zip
Ignore non-letter characters when sorting protocols
X-MAC and XMAC are the same now.
-rw-r--r--data/script.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/data/script.js b/data/script.js
index c3f6bc2..fd4d7f7 100644
--- a/data/script.js
+++ b/data/script.js
@@ -43,6 +43,9 @@ $(document).ready (function () {
if (by == 'rank' || by == 'year') {
return a > b ? 1 : (a < b ? -1 : 0);
} else {
+ /* ignore non-letter chars */
+ a = a.replace (/\W+/, '');
+ b = b.replace (/\W+/, '');
return a.localeCompare (b);
}
});