LP#1902965: Fix search in Bootstrap OPAC
authorJason Boyer <JBoyer@equinoxinitiative.org>
Tue, 12 Jan 2021 13:46:43 +0000 (08:46 -0500)
committerJane Sandberg <sandbej@linnbenton.edu>
Wed, 31 Mar 2021 18:41:15 +0000 (11:41 -0700)
Filters and localization functions don't mix. Assign the html filtered
title to a temp var first.

Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>

Open-ILS/src/templates-bootstrap/opac/parts/result/table.tt2

index db2df33..e0af980 100755 (executable)
                                                 <a href="[% addhref %]" id="mylist_add_[% rec.id %]"
                                                     data-recid="[% rec.id %]" data-action="add"
                                                     role="button" class="mylist_action btn btn-action [% IF ctx.mylist.grep('^' _ rec.id _ '$').size %]hidden[% END %]"
-                                                    title="[% l("Add [_1] to basket", attrs.title | html) %]" rel="nofollow" vocab="">
+                                                    [% SET esc_title = attrs.title | html -%]
+                                                    title="[% l("Add [_1] to basket", esc_title) %]" rel="nofollow" vocab="">
                                                     <i class="fas fa-shopping-basket" aria-hidden="true"></i>
                                                     [% l("Add to basket") %]
                                                 </a>
                                                 <a href="[% delhref %]" id="mylist_delete_[% rec.id %]"
                                                     data-recid="[% rec.id %]" data-action="delete" role="button"
                                                     class="mylist_action btn btn-action [% IF !ctx.mylist.grep('^' _ rec.id _ '$').size %]hidden[% END %]"
-                                                    title="[% l("Remove [_1] from basket", attrs.title | html) %]" rel="nofollow" vocab="">
+                                                    title="[% l("Remove [_1] from basket", esc_title) %]" rel="nofollow" vocab="">
                                                     <i class="fas fa-minus-circle" aria-hidden="true"></i>
                                                     [% l("Remove from basket") %]
                                                 </a>