Add missing encode_entities() to export_factoids()

This commit is contained in:
Pragmatic Software 2015-10-02 20:06:25 -07:00
parent f5c1846458
commit dc2f372551
1 changed files with 4 additions and 4 deletions

View File

@ -177,7 +177,7 @@ sub export_factoids {
print FILE "<tr>\n";
}
print FILE "<td>" . $self->{factoids}->hash->{$channel}->{$trigger}->{owner} . "</td>\n";
print FILE "<td>" . encode_entities($self->{factoids}->hash->{$channel}->{$trigger}->{owner}) . "</td>\n";
print FILE "<td>" . encode_entities(strftime "%Y/%m/%d %H:%M:%S", localtime $self->{factoids}->hash->{$channel}->{$trigger}->{created_on}) . "</td>\n";
print FILE "<td>" . $self->{factoids}->hash->{$channel}->{$trigger}->{ref_count} . "</td>\n";
@ -190,9 +190,9 @@ sub export_factoids {
my $with_args = $self->{factoids}->hash->{$channel}->{$trigger}->{action_with_args};
$with_args =~ s/(.*?)http(s?:\/\/[^ ]+)/encode_entities($1) . "<a href='http" . encode_entities($2) . "'>http" . encode_entities($2) . "<\/a>"/ge;
$with_args =~ s/(.*)<\/a>(.*$)/"$1<\/a>" . encode_entities($2)/e;
print FILE "<td width=100%><b>$trigger</b> is $action<br><br><b>with_args:</b> $with_args</td>\n";
print FILE "<td width=100%><b>" . encode_entities($trigger) . "</b> is " . encode_entities($action) . "<br><br><b>with_args:</b> " . encode_entities($with_args) . "</td>\n";
} else {
print FILE "<td width=100%><b>$trigger</b> is $action</td>\n";
print FILE "<td width=100%><b>" . encode_entities($trigger) . "</b> is " . encode_entities($action) . "</td>\n";
}
if(exists $self->{factoids}->hash->{$channel}->{$trigger}->{edited_by}) {
@ -203,7 +203,7 @@ sub export_factoids {
print FILE "<td></td>\n";
}
print FILE "<td>" . $self->{factoids}->hash->{$channel}->{$trigger}->{ref_user} . "</td>\n";
print FILE "<td>" . encode_entities($self->{factoids}->hash->{$channel}->{$trigger}->{ref_user}) . "</td>\n";
if(exists $self->{factoids}->hash->{$channel}->{$trigger}->{last_referenced_on}) {
print FILE "<td>" . encode_entities(strftime "%Y/%m/%d %H:%M:%S", localtime $self->{factoids}->hash->{$channel}->{$trigger}->{last_referenced_on}) . "</td>\n";