From b93521a444e0b67fc5ad2111517ba2699c96dc80 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 (cherry picked from commit 8be48eeb5180a529c079a32e4db3766bd0e4e142) Signed-off-by: Fridolin Somers --- 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 1c26c37e64..33027172bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -775,12 +775,12 @@ function verify_images() { [% 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 4183df0b07..8a81f90577 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1293,12 +1293,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