mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 05:02:50 +08:00
Merge pull request #458 from okriuchykhin/ok_SCI_957
Fix protocol table filtering by keywords [SCI-957]
This commit is contained in:
commit
c6fe0003f4
1 changed files with 4 additions and 2 deletions
|
@ -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 << "<a href='#' data-action='filter' data-param='#{kw}'>#{kw}</a>"
|
||||
sanitized_kw = sanitize_input(kw)
|
||||
res << "<a href='#' data-action='filter' " \
|
||||
"data-param='#{sanitized_kw}'>#{sanitized_kw}</a>"
|
||||
end
|
||||
sanitize_input(res.join(', '))
|
||||
res.join(', ')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue