Просмотр исходного кода

Show the whole line and remember to use htmlentities.

Morten Brix Pedersen 24 лет назад
Родитель
Сommit
2fa003f2f6
2 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      modules/Pisg/HTMLGenerator.pm
  2. 2 2
      modules/Pisg/Parser/Logfile.pm

+ 1 - 1
modules/Pisg/HTMLGenerator.pm

@@ -996,7 +996,7 @@ sub _mostfoul
         my %hash = (
             nick => $foul[0],
             per  => $spercent{$foul[0]},
-            line => $self->{stats}{foullines}{$foul[0]},
+            line => htmlentities($self->{stats}{foullines}{$foul[0]}),
         );
 
         my $text = $self->_template_text('foul1', %hash);

+ 2 - 2
modules/Pisg/Parser/Logfile.pm

@@ -162,7 +162,7 @@ sub _parse_dir
                                  } 0..$#filesarray ];
         @filesarray = @newarray;
     } else {
-        @filesarray = sort @filesarray;
+        @filesarray = sort {lc($a) cmp lc($b)} @filesarray;
     }
 
     foreach my $file (@filesarray) {
@@ -272,7 +272,7 @@ sub _parse_file
 
                     if (my @foul = $saying =~ /(\b$self->{cfg}->{foulwords}|$self->{cfg}->{foulwords}\b)/io) {
                         $stats->{foul}{$nick} += scalar @foul;
-                        push @{ $lines->{foullines}{$nick} }, $saying;
+                        push @{ $lines->{foullines}{$nick} }, $line;
                     }