about summary refs log tree commit homepage
path: root/lib/PublicInbox/MID.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/MID.pm')
-rw-r--r--lib/PublicInbox/MID.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/MID.pm b/lib/PublicInbox/MID.pm
index 7f1ab15e..6904d61a 100644
--- a/lib/PublicInbox/MID.pm
+++ b/lib/PublicInbox/MID.pm
@@ -26,11 +26,11 @@ sub mid_clean {
         $mid;
 }
 
-# this is idempotent
+# this is idempotent, used for HTML anchor/ids and such
 sub id_compress {
         my ($id, $force) = @_;
 
-        if ($force || $id =~ /[^\w\-]/ || length($id) > MID_MAX) {
+        if ($force || $id =~ /[^a-zA-Z0-9_\-]/ || length($id) > MID_MAX) {
                 utf8::encode($id);
                 return sha1_hex($id);
         }