]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/comments.pm
po: Check that translated underlay directories exist before using them for master...
[git.ikiwiki.info.git] / IkiWiki / Plugin / comments.pm
index bbf850a17f24399a7e1fff86743f1c23d4c7503c..4603417103c3abdb3e4d16beb6c60c8c90f05118 100644 (file)
@@ -221,7 +221,9 @@ sub preprocess {
        }
 
        if (defined $params{subject}) {
-               $pagestate{$page}{meta}{title} = $params{subject};
+               # encode title the same way meta does
+               eval q{use HTML::Entities};
+               $pagestate{$page}{meta}{title} = HTML::Entities::encode_numeric(decode_entities($params{subject}));
        }
 
        if ($params{page} =~ m/\/\Q$config{comments_pagename}\E\d+_/) {
@@ -855,14 +857,14 @@ sub unique_comment_location ($$$) {
 
 sub page_to_id ($) {
        # Converts a comment page name into a unique, legal html id
-       # addtibute value, that can be used as an anchor to link to the
+       # attribute value, that can be used as an anchor to link to the
        # comment.
        my $page=shift;
 
        eval q{use Digest::MD5 'md5_hex'};
        error($@) if $@;
 
-       return "comment-".md5_hex(Encode::encode_utf8(($page));
+       return "comment-".md5_hex(Encode::encode_utf8(($page)));
 }
        
 package IkiWiki::PageSpec;