Browse Source

Fixed the bug sbringer mentioned regarding <word> and word>

cheetham14 25 năm trước cách đây
mục cha
commit
d3f39aa942
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      pisg.pl

+ 3 - 3
pisg.pl

@@ -332,7 +332,7 @@ sub parse_file
                     my $l = length($saying);
 
                     if ($l > $minquote && $l < $maxquote) {
-                        $saying = htmlentities($saying);
+                        my $saying = htmlentities($saying);
 
                         # Creates $hash{nick}[n] - a hash of an array.
                         push (@{ $sayings{$nick} }, $saying);
@@ -366,8 +366,8 @@ sub parse_file
                         # ignore contractions
                         next if ($word =~ m/'..?$/);
 
-                        $wordcount{$word}++ unless (grep /^\Q$word\E$/i, @ignore);
-                        $lastused{$word} = $nick;
+                        $wordcount{htmlentities($word)}++ unless (grep /^\Q$word\E$/i, @ignore);
+                        $lastused{htmlentities($word)} = $nick;
                     }