fix for Show More Copies link
authorJason Etheridge <jason@EquinoxInitiative.org>
Tue, 2 Feb 2021 17:25:29 +0000 (12:25 -0500)
committerJason Etheridge <jason@EquinoxInitiative.org>
Fri, 5 Feb 2021 09:49:51 +0000 (04:49 -0500)
The commit for "LP1687545: Force TT CGI plugin to use ampersands in query
strings" has &copy in URL's turning into the copyright symbol, mangling
query params such as &copy_offset and &copy_limit

This needs a more comprehensive fix, see:
https://bugs.launchpad.net/evergreen/+bug/1914116

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Open-ILS/src/templates-bootstrap/opac/parts/record/copy_table.tt2
Open-ILS/src/templates/opac/parts/record/copy_table.tt2

index ed992ea..8984cdd 100755 (executable)
@@ -348,11 +348,11 @@ END; # FOREACH bib
                     [%- more_copies_limit = 50 %] [%# TODO: config %]
                     [%- IF  ctx.copy_limit != more_copies_limit AND copies.size >= ctx.copy_limit AND ctx.copy_limit < total_copies %]
                         <div class="rdetail_show_copies">
-                            <a href="[% mkurl('', {copy_limit => more_copies_limit, copy_offset => 0}) %]"><i class="fas fa-plus-square"></i> [% l('Show more copies') %]</a>
+                            <a href="[% mkurl('', {copy_limit => more_copies_limit, copy_offset => 0}) | html %]"><i class="fas fa-plus-square"></i> [% l('Show more copies') %]</a>
                         </div>
                     [%- ELSIF ctx.copy_limit == more_copies_limit %]
                         <div  class="rdetail_show_copies">
-                            <a href="[% mkurl('', {copy_limit => 0, copy_offset => 0}) %]"><i class="fas fa-minus-square"></i> [% l('Show fewer copies') %]</a>
+                            <a href="[% mkurl('', {copy_limit => 0, copy_offset => 0}) | html %]"><i class="fas fa-minus-square"></i> [% l('Show fewer copies') %]</a>
                         </div>
                     [%- END %]
                 </td>
index 6e214bb..a8a5aca 100644 (file)
@@ -362,11 +362,11 @@ END; # FOREACH bib
                 [%- IF  ctx.copy_limit != more_copies_limit AND copies.size >= ctx.copy_limit AND ctx.copy_limit < total_copies %]
                     <div class="rdetail_show_copies">
                         <img src="[% ctx.media_prefix %]/images/plus_sign.png[% ctx.cache_key %]" alt="[% l('Show more copies icon') %]"/>
-                        <a href="[% mkurl('', {copy_limit => more_copies_limit, copy_offset => 0}) %]">[% l('Show more copies') %]</a>
+                        <a href="[% mkurl('', {copy_limit => more_copies_limit, copy_offset => 0}) | html %]">[% l('Show more copies') %]</a>
                     </div>
                 [%- ELSIF ctx.copy_limit == more_copies_limit %]
                     <div  class="rdetail_show_copies">
-                        <img src="[% ctx.media_prefix %]/images/minus_sign.png[% ctx.cache_key %]" alt="[% l('Show fewer copies icon') %]"/>
+                        <img src="[% ctx.media_prefix %]/images/minus_sign.png[% ctx.cache_key | html %]" alt="[% l('Show fewer copies icon') %]"/>
                         <a href="[% mkurl('', {copy_limit => 0, copy_offset => 0}) %]">[% l('Show fewer copies') %]</a>
                     </div>
                 [%- END %]