From 05fb1ed26eb58b37f40d82407bb3452af9080392 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Wed, 19 May 2010 12:12:14 +1200 Subject: [PATCH] Support newlines in the notes field when displaying Signed-off-by: MJ Ray http://bugs.koha-community.org/show_bug.cgi?id=4527 --- catalogue/detail.pl | 3 +++ opac/opac-detail.pl | 4 ++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index de355fa..1e03216 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -115,6 +115,9 @@ my $marcurlsarray = GetMarcUrls ($record,$marcflavour); my $marchostsarray = GetMarcHosts($record,$marcflavour); my $subtitle = GetRecordValue('subtitle', $record, $fw); +# Turn newlines into HTML-y newlines +$_->{marcnote} =~ s{\n}{
}g foreach (@$marcnotesarray); + # Get Branches, Itemtypes and Locations my $branches = GetBranches(); my $itemtypes = GetItemTypes(); diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index a00e976..18165ff 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -542,6 +542,10 @@ my $marcurlsarray = GetMarcUrls ($record,$marcflavour); my $marchostsarray = GetMarcHosts($record,$marcflavour); my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber)); +# Support newlines in the notes content +$_->{marcnote} =~ s{\n}{
}g foreach (@$marcnotesarray); + + $template->param( MARCNOTES => $marcnotesarray, MARCSUBJCTS => $marcsubjctsarray, -- 1.7.2.5