Two small fixes

User input needs to be HTML quoted when printed.
The regular expression matching needs the ignore case flag.
This commit is contained in:
Alex Jakimenko
2014-04-15 07:31:50 +02:00
committed by Alex Schroeder
parent efce35e250
commit f270a3ced4

View File

@@ -91,14 +91,14 @@ sub DespamBannedContent {
foreach my $url (@urls) {
if ($url =~ /($regexp)/i) {
return Tss('Rule "%1" matched "%2" on this page.',
QuoteHtml($regexp), $url);
QuoteHtml($regexp), QuoteHtml($url));
}
}
}
# depends on strange-spam.pl!
foreach (@DespamStrangeRules) {
my $regexp = $_;
if ($str =~ /($regexp)/) {
if ($str =~ /($regexp)/i) {
my $match = $1;
$match =~ s/\n/ /g;
return Tss('Rule "%1" matched "%2" on this page.',