--- trunk/lib/Frey/Shell/Grep.pm 2008/12/14 23:21:18 841 +++ trunk/lib/Frey/Shell/Grep.pm 2008/12/14 23:22:15 842 @@ -76,6 +76,8 @@ my $self = shift; my $callback = {@_}; + warn "# callbacks: ",$self->dump( $callback ) if $callback; + my $patt = $self->pattern; $self->title( $patt ); @@ -104,7 +106,6 @@ my $text = $result->{text} || die "no text"; - $text = $self->html_escape( $text ); if ( my $path = $result->{path} ) { my $line = $result->{line} || die "no line"; if ( $path ne $last_path ) { @@ -113,11 +114,13 @@ if ( my $dd = $callback->{dd} ) { $html .= $dd->( $patt, $path, $line, $text ); } else { + $text = $self->html_escape( $text ); $text =~ s{(\Q$patt\E)}{$1}; $html .= qq|
$line $text|; } $last_path = $path; } else { + $text = $self->html_escape( $text ); $html .= qq|
$text
|; } }