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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt (-1 / +1 lines)
Lines 263-269 Link Here
263
            contentType : "application/x-www-form-urlencoded", // we must claim this mimetype or CGI will not decode the URL encoding
263
            contentType : "application/x-www-form-urlencoded", // we must claim this mimetype or CGI will not decode the URL encoding
264
            dataType    : "json",
264
            dataType    : "json",
265
            data        : {
265
            data        : {
266
                            "quote"     : JSON.stringify(oTable.fnGetData()),
266
                            "quote"     : encodeURI ( JSON.stringify(oTable.fnGetData()) ),
267
                            "action"    : "add",
267
                            "action"    : "add",
268
                          },
268
                          },
269
            success     : function(){
269
            success     : function(){
(-)a/tools/quotes/quotes-upload_ajax.pl (-2 / +3 lines)
Lines 22-27 use warnings; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use JSON;
24
use JSON;
25
use URI::Escape;
25
use autouse 'Data::Dumper' => qw(Dumper);
26
use autouse 'Data::Dumper' => qw(Dumper);
26
27
27
use C4::Auth;
28
use C4::Auth;
Lines 40-47 unless ($status eq "ok") { Link Here
40
}
41
}
41
42
42
my $success = 'true';
43
my $success = 'true';
44
my $quotes_tmp = uri_unescape( $cgi->param('quote' ) );
45
my $quotes = decode_json( $quotes_tmp );
43
46
44
my $quotes = decode_json($cgi->param('quote'));
45
my $action = $cgi->param('action');
47
my $action = $cgi->param('action');
46
48
47
my $sth = $dbh->prepare('INSERT INTO quotes (source, text) VALUES (?, ?);');
49
my $sth = $dbh->prepare('INSERT INTO quotes (source, text) VALUES (?, ?);');
48
- 

Return to bug 15684