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

(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js (-1 / +1 lines)
Lines 151-157 $(document).ready(function() { Link Here
151
            $(event.target).text( __("Testing...") ).prop('disabled', true);
151
            $(event.target).text( __("Testing...") ).prop('disabled', true);
152
            $.ajax(Object.assign({}, {...review_ajax_params, type: "GET"}, {
152
            $.ajax(Object.assign({}, {...review_ajax_params, type: "GET"}, {
153
                data: {
153
                data: {
154
                    tag: $('#test').val(),
154
                    tag: escape_str($('#test').val()),
155
                    op: 'test',
155
                    op: 'test',
156
                },
156
                },
157
                success: success_test_call // success_reject
157
                success: success_test_call // success_reject
(-)a/tags/review.pl (-2 / +2 lines)
Lines 23-29 use Modern::Perl; Link Here
23
use POSIX qw( ceil );
23
use POSIX qw( ceil );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use CGI::Cookie;     # need to check cookies before having CGI parse the POST request
25
use CGI::Cookie;     # need to check cookies before having CGI parse the POST request
26
use URI::Escape qw( uri_escape_utf8 );
26
use URI::Escape qw( uri_escape_utf8 uri_unescape );
27
use C4::Auth qw( check_cookie_auth get_template_and_user );
27
use C4::Auth qw( check_cookie_auth get_template_and_user );
28
use C4::Context;
28
use C4::Context;
29
use C4::Output qw( output_with_http_headers is_ajax pagination_bar output_html_with_http_headers );
29
use C4::Output qw( output_with_http_headers is_ajax pagination_bar output_html_with_http_headers );
Lines 60-65 if (is_ajax()) { Link Here
60
    my $op = $input->param('op') || q{};
60
    my $op = $input->param('op') || q{};
61
    my $tag = $input->param('tag');
61
    my $tag = $input->param('tag');
62
    if ($op eq 'test') {
62
    if ($op eq 'test') {
63
        $tag = uri_unescape($tag);
63
        my $check = is_approved($tag);
64
        my $check = is_approved($tag);
64
        $js_reply = ( $check >=  1 ? 'success' : $check <= -1 ? 'failure' : 'indeterminate' ) . "_test('".uri_escape_utf8($tag)."');\n";
65
        $js_reply = ( $check >=  1 ? 'success' : $check <= -1 ? 'failure' : 'indeterminate' ) . "_test('".uri_escape_utf8($tag)."');\n";
65
    }
66
    }
66
- 

Return to bug 38969