Bugzilla – Attachment 98950 Details for
Bug 23527
BakerTaylorBookstoreURL is converted to escaped characters by template, rendering it invalid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23527 - BakerTaylorBookstoreURL is converted to escaped characters by template, rendering it invalid
Bug-23527---BakerTaylorBookstoreURL-is-converted-t.patch (text/plain), 4.27 KB, created by
Owen Leonard
on 2020-02-14 14:42:43 UTC
(
hide
)
Description:
Bug 23527 - BakerTaylorBookstoreURL is converted to escaped characters by template, rendering it invalid
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-02-14 14:42:43 UTC
Size:
4.27 KB
patch
obsolete
>From fd7805cd464f99758b9030551c5f64c8f58d3bff Mon Sep 17 00:00:00 2001 >From: David Kuhn <techservspec@gmail.com> >Date: Sat, 31 Aug 2019 16:23:16 -0700 >Subject: [PATCH] Bug 23527 - BakerTaylorBookstoreURL is converted to escaped > characters by template, rendering it invalid > >Changing the template toolkit filter for rendering the value of >BakerTaylorBookstoreURL in opac-detail.tt and opac-results.tt from uri >to url fixes the problem. > >To test (requires a Baker & Taylor username and password): > >1. Enter the B&T url into BakerTaylorBookstoreURL. >2. Set BakerTaylorEnabled to "add" and enter your username and password. >3. Look up a title in the OPAC. >4. Locate a title with a cover image. >5. Click on the cover image. You are not redirected to the url stored > in BakerTaylorBookstoreURL. >6. Display the full record for the title >7. Click on the cover image. You are not redirected to the url stored > in BakerTaylorBookstoreURL. >8. Apply the patch. >9. Refresh the OPAC display. >10. Click on the cover image. You are now redirected to the specified url. >11. Return to the results list. >12. Click on a cover image. You are now redirected to the specified url. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Although I don't have valid Baker & Taylor credentials I was able to use >dummy data to verify that the links in the template are correctly >encoded with this patch. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 4 ++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > >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 8c1c39e8f54..c3d27e60d20 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -92,9 +92,9 @@ > [% IF ( BakerTaylorEnabled && bt_id ) %] > [% IF BakerTaylorBookstoreURL %] > [% IF ( OPACURLOpenInNewWindow ) %] >- <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]" target="_blank" rel="noreferrer"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> >+ <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]" target="_blank" rel="noreferrer"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> > [% ELSE %] >- <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> >+ <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a> > [% END %] > [% ELSE %] > <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index ba46f950f4b..a9bf80502e6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -314,7 +314,7 @@ > [% IF ( BakerTaylorEnabled && BakerTaylorBookstoreURL ) %] > [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %] > [% IF ( bt_id ) %] >- <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"> >+ <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]"> > <img alt="See Baker & Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /> > </a> > [% ELSE %] >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23527
:
92516
|
98950
|
99127