--- trunk/lib/Frey/VCI.pm 2008/11/25 14:06:38 514 +++ trunk/lib/Frey/VCI.pm 2008/11/25 14:09:50 515 @@ -5,10 +5,9 @@ use lib '/rest/cvs/vci/lib'; # FIXME use VCI; -use HTML::Entities qw/encode_entities/; - extends 'Frey'; with 'Frey::Web'; +with 'Frey::Escape'; use Data::Dump qw/dump/; @@ -39,19 +38,6 @@ documentation => 'last revision in repository if not specified', ); -sub pre_dump { - my $o = shift; - # because Data::Dumper::HTML sucks - my $t; - if ( blessed($o) && $o->can('dump') ) { - $t = $o->dump; - $t =~ s/ {8}/ /gm; - } else { - $t = dump( $o ); - } - return '
' . encode_entities($t) . '

'; -} - sub as_markup { my ( $self ) = @_; @@ -61,7 +47,7 @@ repo => $self->repo, type => $self->type, debug => $self->debug, - ); + ) || die "can't open ",$self->type," ",$self->repo; my @projects_available = map { $_->name } @{ $repo->projects }; die $self->project," not one of valid projects ", dump( @projects_available ) unless grep { $self->project } @projects_available; @@ -84,8 +70,8 @@ div( 'commiter', $commit->committer ) . div( 'date', $commit->time->iso8601 ) . div( 'message', $commit->message ) . - '
' . encode_entities( $diff->raw ) . '
' . - pre_dump( $diff ); + '
' . $self->html_escape( $diff->raw ) . '
' . + 'dump' . $self->html_dump( $diff ) . ''; $self->title( $self->repo . '/' . $project->name ); return $body;