From 17a53cbd7f03d27abf5be9dd88cde5def4949a0a Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Thu, 26 Jan 2017 15:52:46 +0100 Subject: [PATCH] Fix protocol table filtering by keywords [SCI-957] --- app/datatables/protocols_datatable.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/datatables/protocols_datatable.rb b/app/datatables/protocols_datatable.rb index a4d36c47e..db57390f9 100644 --- a/app/datatables/protocols_datatable.rb +++ b/app/datatables/protocols_datatable.rb @@ -190,9 +190,11 @@ class ProtocolsDatatable < AjaxDatatablesRails::Base kws = record.protocol_keywords_str.split(", ") res = [] kws.sort_by{ |word| word.downcase }.each do |kw| - res << "#{kw}" + sanitized_kw = sanitize_input(kw) + res << "#{sanitized_kw}" end - sanitize_input(res.join(', ')) + res.join(', ') end end