From 9e222deaa06f3f95696a8632eb48a0696a11568e Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 9 Aug 2005 22:26:38 +0000 Subject: [PATCH] Show the rest of the filename if we truncate. --- last.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/last.pl b/last.pl index 6024739..3576ba9 100755 --- a/last.pl +++ b/last.pl @@ -58,9 +58,13 @@ for my $t (@thumbnails[0..$pdfweb::config::show_last-1]) { close DESC; if (length($desc) > 30) { - $desc = substr($desc, 0, 30) . " ..."; + # Is this abuse? + $desc = HTML::Entities::encode_entities(substr($desc, 0, 30)) . " ..."; + } else { + $desc = HTML::Entities::encode_entities($desc); } - $desc = HTML::Entities::encode_entities($desc); my $time = (stat($t))[9]; my $date = POSIX::strftime("%Y-%m-%d %H:%M", localtime($time)); -- 2.39.2