Accept proper tag chars in hashSwitch()
authorChip Black <bytex64@bytex64.net>
Wed, 19 Jan 2011 09:14:18 +0000 (01:14 -0800)
committerChip Black <bytex64@bytex64.net>
Wed, 19 Jan 2011 09:14:33 +0000 (01:14 -0800)
www/js/blerg.js

index 2415483..eae9cbc 100644 (file)
@@ -433,7 +433,7 @@ function hashSwitch() {
     if (m = location.search.match(/^\?post\/([^/]+)\/(.+)/)) {
         $('post').show();
         $('post.content').value = '[' + decodeURIComponent(m[1]).replace(']','').replace('[','') + '](' + decodeURIComponent(m[2]) + ')';
-    } else if (m = location.hash.match(/^#(ref|tag)\/(\w+)$/)) {
+    } else if (m = location.hash.match(/^#(ref|tag)\/([A-Za-z0-9_-]+)$/)) {
         currentPager = new Tag(m[1], m[2]);
         currentPager.show();
     } else if (m = location.hash.match(/^#([A-Za-z0-9_-]+)(:(\d+))?$/)) {