escape only entities which are dangerous to html
[webpac] / index_DBI.pm
index 6729bd3..0ea4fad 100644 (file)
@@ -137,7 +137,7 @@ sub fetch {
        $sth->execute() || die "execute: $sql; ".$self->{dbh}->errstr();
        my @arr;
        while (my $row = $sth->fetchrow_hashref) {
-               $row->{item} = HTML::Entities::encode($row->{item});
+               $row->{item} = HTML::Entities::encode($row->{item},'<>&"');
                push @arr,$row;
        }
        return @arr;