diff --git a/app/assets/javascripts/sitewide/dropdown_selector.js b/app/assets/javascripts/sitewide/dropdown_selector.js
index c4d9519fa..71e9a23f9 100644
--- a/app/assets/javascripts/sitewide/dropdown_selector.js
+++ b/app/assets/javascripts/sitewide/dropdown_selector.js
@@ -541,16 +541,22 @@ var dropdownSelector = (function() {
var customLabel = selector2.data('config').optionLabel;
var customClass = params.optionClass || selector2.data('config').optionClass || '';
var customStyle = selector2.data('config').optionStyle;
- return $(`
-
- ${customLabel ? customLabel(option) : option.label}
-
"
+ var optionElement = $(`
+
+
`);
+ optionElement
+ .attr('title', (option.params && option.params.tooltip) || '')
+ .attr('data-params', JSON.stringify(option.params || {}))
+ .attr('data-label', option.label)
+ .attr('data-group', group ? group.value : '')
+ .attr('data-value', option.value);
+ if (customLabel) {
+ optionElement.html(customLabel(option));
+ } else {
+ optionElement.html(option.label);
+ }
+ return optionElement;
}
// Draw delimiter object
diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb
index 4cef8c8d8..a821e70aa 100644
--- a/app/controllers/protocols_controller.rb
+++ b/app/controllers/protocols_controller.rb
@@ -172,12 +172,6 @@ class ProtocolsController < ApplicationController
def update_keywords
respond_to do |format|
- # sanitize user input
- if params[:keywords]
- params[:keywords].collect! do |keyword|
- escape_input(keyword)
- end
- end
if @protocol.update_keywords(params[:keywords])
format.json do
log_activity(:edit_keywords_in_protocol_repository, nil, protocol: @protocol.id)