LP#1923225: fix handling of untruncated display fields in accordion user/jeffdavis/lp1923225-escape-display-fields
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 13 Apr 2021 23:05:41 +0000 (16:05 -0700)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Tue, 13 Apr 2021 23:19:05 +0000 (16:19 -0700)
commitce5d31bbfd8885ede76ae663d129a25023c30577
tree76bac542298141be45bf7c00df20bcc4fa2f1303
parent6ab6a8137930eb74d357148c4a42a73e370da2a1
LP#1923225: fix handling of untruncated display fields in accordion

A previous commit used the TT2 "html" filter to escape strings to which the
accordion macro is applied, but which don't get truncated.  But that's
incompatible with display fields, which contain embedded HTML and
therefore shouldn't be escaped in that way.  This commit uses
HTML::Defang on untruncated accordion input instead (which is consistent
with how truncated strings are handled by the same macro).

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
Open-ILS/src/templates/opac/parts/misc_util.tt2