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

(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-5 / +1 lines)
Lines 578-586 jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { Link Here
578
578
579
                                function build_query(col, value){
579
                                function build_query(col, value){
580
580
581
                                    // escape SQL special character \
582
                                    value = value.replace(/(\\)/g, "\\$1" );
583
584
                                    var parts = [];
581
                                    var parts = [];
585
                                    var attributes = col.data.split(':');
582
                                    var attributes = col.data.split(':');
586
                                    for (var i=0;i<attributes.length;i++){
583
                                    for (var i=0;i<attributes.length;i++){
Lines 592-598 jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { Link Here
592
                                            criteria = "exact";
589
                                            criteria = "exact";
593
                                        } else {
590
                                        } else {
594
                                           // escape SQL LIKE special characters % and _
591
                                           // escape SQL LIKE special characters % and _
595
                                           value = value.replace(/(\%|\_)/g, "\\$1");
592
                                           value = value.replace(/(\%|\_|\\)/g, "\\$1");
596
                                        }
593
                                        }
597
                                        part[!attr.includes('.')?'me.'+attr:attr] = criteria === 'exact'
594
                                        part[!attr.includes('.')?'me.'+attr:attr] = criteria === 'exact'
598
                                            ? value
595
                                            ? value
599
- 

Return to bug 31565