diff options
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 2ad422f5f..98f9f8b3d 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -819,13 +819,10 @@ sub page_to_id ($) { # comment. my $page=shift; - # It needs to start with a letter. - $page="comment_".$page; - - # Encode any illegal characters. - $page=~s/([^A-Za-z0-9-_:.])/"__".ord($1)."__"/eg; + eval q{use Digest::MD5 'md5_hex'}; + error($@) if $@; - return $page; + return "comment-".md5_hex($page); } package IkiWiki::PageSpec; |