+ my @lines=IkiWiki::rcs_diff($params{rev}, $maxlines+1);
+ if (@lines) {
+ my $diff;
+ if (@lines > $maxlines) {
+ $diff=join("", @lines[0..($maxlines-1)])."\n".
+ gettext("(Diff truncated)");
+ }
+ else {
+ $diff=join("", @lines);
+ }
+ # escape html
+ $diff = encode_entities($diff);