View | Details | Raw Unified | Return to bug 22223
Collapse All | Expand All

(-)a/Koha/Template/Plugin/Filter.pm (+32 lines)
Line 0 Link Here
1
package Koha::Template::Plugin::Filter;
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it under the
6
# terms of the GNU General Public License as published by the Free Software
7
# Foundation; either version 3 of the License, or (at your option) any later
8
# version.
9
#
10
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License along
15
# with Koha; if not, write to the Free Software Foundation, Inc.,
16
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
18
use Modern::Perl;
19
20
use Template::Plugin::Filter;
21
use base qw( Template::Plugin::Filter );
22
23
our $DYNAMIC = 1;
24
25
sub no_double_encode {
26
    my ( $self, $value ) = @_;
27
28
    $value =~ s/%25([0-9a-f]{2})/%$1/gi;
29
    return $value;
30
}
31
32
1;
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-2 / +3 lines)
Lines 3-8 Link Here
3
[% USE Math %]
3
[% USE Math %]
4
[% USE Koha %]
4
[% USE Koha %]
5
[% USE KohaDates %]
5
[% USE KohaDates %]
6
[% USE Filter %]
6
[% USE Branches %]
7
[% USE Branches %]
7
[% USE ColumnsSettings %]
8
[% USE ColumnsSettings %]
8
[% USE AuthorisedValues %]
9
[% USE AuthorisedValues %]
Lines 1335-1341 Link Here
1335
                                    [% IF Koha.Preference("OPACURLOpenInNewWindow") %]
1336
                                    [% IF Koha.Preference("OPACURLOpenInNewWindow") %]
1336
                                    <a target="_blank" rel="noreferrer" href="[% ITEM_RESULT.uri | url %]" property="url">[% ITEM_RESULT.uri | html %]</a>
1337
                                    <a target="_blank" rel="noreferrer" href="[% ITEM_RESULT.uri | url %]" property="url">[% ITEM_RESULT.uri | html %]</a>
1337
                                    [% ELSE %]
1338
                                    [% ELSE %]
1338
                                    <a href="[% ITEM_RESULT.uri | url %]" property="url">[% ITEM_RESULT.uri | html %]</a>
1339
                                    [% uri_url_filtered = BLOCK %][% ITEM_RESULT.uri | url %][% END %]
1340
                                    <a href="[% Filter.no_double_encode( uri_url_filtered ) | $raw %]" property="url">[% uri_url_filtered | html %]</a>
1339
                                    [% END %]
1341
                                    [% END %]
1340
                                [% END %]
1342
                                [% END %]
1341
                            [% END %]
1343
                            [% END %]
1342
- 

Return to bug 22223