Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

(jeffa) 2Re: Apache::CVS::HTML + Perl::Tidy

by jeffa (Bishop)
on Apr 27, 2003 at 18:58 UTC ( #253510=note: print w/replies, xml ) Need Help??

in reply to Re: Apache::CVS::HTML + Perl::Tidy
in thread Apache::CVS::HTML + Perl::Tidy

I just moved the repository from mobius (which is dying soon) to unlocalhost, so i changed your link above. Shortly after, i thought that i should finally get around to fixing the problem. :D

Here is the shortest workaround i could come up with:

# somewhere at top add this use HTML::Entities; # and somewhere in the middle add this sub print_revision { my $self = shift; my @time_units = ('days', 'hours', 'minutes', 'seconds'); my ($uri_base, $revision, $diff_revision) = @_; my $revision_uri = "$uri_base?r=" . $revision->number(); my $date = localtime($revision->date()); my $age = join(', ', map { $revision->age()->{$_} . ' ' . $_ } @time_units); my $symbol = $revision->symbol() || '&nbsp;'; $self->request()->print("<tr> <td><a href=$revision_uri>" . $revision->number() . '</td>' . '<td>' . $revision->author() . '</td>' . '<td>' . $revision->state() . '</td>' . "<td>$symbol</td><td>$date</td><td>$age</td>" . '<td>' . encode_entities($revision->comment()) . '</td>'); if ($diff_revision eq $revision->number()) { $self->request()->print('<td>selected for diff</td>'); } else { if ($diff_revision) { $self->request()->print(qq|<td><a href="$uri_base?ds=| . $revision->number() . qq|&dt=$diff_revision">select for diff | . "with $diff_revision</a>"); } else { $self->request()->print(qq|<td><a href="$uri_base?ds=| . $revision->number() . '">select for diff</a>'); } } $self->request()->print('</tr>'); }
The magic line is:
'<td>' . encode_entities($revision->comment()) . '</td>');
ugly hack (having to repeat all of that code) .. but it works ;)


(the triplet paradiddle with high-hat)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://253510]
[Tanktalus]: Sure, no one is active for hours and hours in the cb, so I go to upgrade the db, and then someone is active. Sheesh :)
[Discipulus]: anyway poppins probably died with the last night cold. But is not normal to see them in dec. they must pop in April
NodeReaper eyes the thorns in the side
Discipulus : the party puller!
[Discipulus]: I was trying to solve this but i'm not. my regex-fu is stuck at primary school

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2017-12-18 21:39 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (499 votes). Check out past polls.