Bugzilla – Attachment 109206 Details for
Bug 26069
Twitter share button leaks information to Twitter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26069: Pass correct URL to twitter
Bug-26069-Pass-correct-URL-to-twitter.patch (text/plain), 2.66 KB, created by
Katrin Fischer
on 2020-08-26 21:14:36 UTC
(
hide
)
Description:
Bug 26069: Pass correct URL to twitter
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-08-26 21:14:36 UTC
Size:
2.66 KB
patch
obsolete
>From b8a1c1ffd1fd97ab77d023ca712a09163d46bab9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 21 Aug 2020 16:07:46 +0200 >Subject: [PATCH] Bug 26069: Pass correct URL to twitter > >We don't provide the url of the detail page so the twitter JS code >retrieve the current location, with the search terms. > >Test plan: >Do a search >Click on a result >Click on the twitter button and confirm that the link only contain >biblionumber=x in the parameter > >Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 5 +---- > 1 file changed, 1 insertion(+), 4 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 2560794af0..214cc6b2d6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1101,7 +1101,7 @@ > [% CASE "email" -%] > <div><a id="email" href="mailto:?subject=[% title |url %]&body=[% title |url %]%20([% current_url |url %])" title="Share by email"><i class="fa fa-envelope-o" aria-hidden="true"></i></a></div> > [% CASE "twitter" -%] >- <div><a id="twitter" href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-text="[% title |url %]" data-lang="[% lang | html %]" title="Share on Twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a></div> >+ <div><a id="twitter" href="https://twitter.com/share?url=[% current_url|url %]&text=[% title | uri %]" class="twitter-share-button" data-count="none" data-lang="[% lang | html %]" title="Share on Twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a></div> > [% END -%] > [% END %] > </div> >@@ -1360,9 +1360,6 @@ > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE greybox.inc %] >-[% IF ( SocialNetworks ) %] >- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> >-[% END %] > [% IF ( OpacStarRatings != 'disable' ) %][% Asset.js("lib/jquery/plugins/jquery.barrating.min.js") | $raw %][% END %] > > [% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %][% END %] >-- >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 26069
:
108824
|
108832
|
109121
| 109206