escape only entities which are dangerous to html
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 15 Mar 2003 19:37:07 +0000 (19:37 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 15 Mar 2003 19:37:07 +0000 (19:37 +0000)
git-svn-id: file:///home/dpavlin/private/svn/webpac/trunk@37 13eb9ef6-21d5-0310-b721-a9d68796d827

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;