From 1fd1cd288c346694970ba7f71677def55c403425 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 31 Jul 2006 17:08:18 +0200 Subject: [PATCH] Strip leading and trailing blanks from the model in the infobox. --- perl/Sesse/pr0n/Common.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index 8fe17d7..6bcc538 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -393,7 +393,12 @@ sub make_infobox { push @lines, "$1-$2-$3 $4:$5"; } - push @lines, $info->{'Model'} if (defined($info->{'Model'})); + if (defined($info->{'Model'})) { + my $model = $info->{'Model'}; + $model =~ s/^\s+//; + $model =~ s/\s+$//; + push @lines, $model; + } # classic fields if (defined($info->{'FocalLength'}) && $info->{'FocalLength'} =~ /^(\d+)(?:\.\d+)?(?:mm)?$/) { -- 2.39.2