mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-27 06:19:25 +01:00
Add missing encode_entities() to export_factoids()
This commit is contained in:
parent
f5c1846458
commit
dc2f372551
@ -177,7 +177,7 @@ sub export_factoids {
|
|||||||
print FILE "<tr>\n";
|
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>" . 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";
|
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};
|
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/(.*?)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;
|
$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 {
|
} 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}) {
|
if(exists $self->{factoids}->hash->{$channel}->{$trigger}->{edited_by}) {
|
||||||
@ -203,7 +203,7 @@ sub export_factoids {
|
|||||||
print FILE "<td></td>\n";
|
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}) {
|
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";
|
print FILE "<td>" . encode_entities(strftime "%Y/%m/%d %H:%M:%S", localtime $self->{factoids}->hash->{$channel}->{$trigger}->{last_referenced_on}) . "</td>\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user