From 8be48eeb5180a529c079a32e4db3766bd0e4e142 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 18 Dec 2017 14:42:25 +0000 Subject: [PATCH] Bug 19677: Properly escape enumchrom/serialseq data Some serial issues use angle brackets for denoting certain data. Currently this is not displayed in Koha. This patch escapes the data so that angle brackets will display. To test: 1 - Add an enumchron field to an item containg angle brackets: "This is a " 2 - View the record in the staff and opac, not the field displays as: "This is a" 3 - Apply patch 4 - Note full text now displays Signed-off-by: Charlotte Cordwell Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 6 +++--- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index be5932bea6..c3d9df303d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -467,12 +467,12 @@ [% item.enumchron %] [% IF ( item.serialseq && item.enumchron!=item.serialseq ) %] -- - [% item.serialseq %] + [% item.serialseq | html %] [% END %] [% ELSIF item.enumchron %] - [% item.enumchron %] + [% item.enumchron | html %] [% ELSIF item.serialseq %] - [% item.serialseq %] + [% item.serialseq | html %] [% END %] [% IF ( item.publisheddate ) %] ([% item.publisheddate | $KohaDates %]) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index a937946090..97ea7a0b42 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1307,12 +1307,12 @@ [% ITEM_RESULT.enumchron %] [% IF ( ITEM_RESULT.serialseq && ITEM_RESULT.enumchron!=ITEM_RESULT.serialseq ) %] -- - [% ITEM_RESULT.serialseq %] + [% ITEM_RESULT.serialseq | html %] [% END %] [% ELSIF ITEM_RESULT.enumchron %] - [% ITEM_RESULT.enumchron %] + [% ITEM_RESULT.enumchron | html %] [% ELSIF ITEM_RESULT.serialseq %] - [% ITEM_RESULT.serialseq %] + [% ITEM_RESULT.serialseq | html %] [% END %] [% IF ( ITEM_RESULT.publisheddate ) %] ([% ITEM_RESULT.publisheddate | $KohaDates %]) -- 2.39.5