mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 03:59:51 +08:00
Fix escaping for protocol keyword [SCI-8137] (#5147)
This commit is contained in:
parent
483a7aad5b
commit
fedd9e040e
1 changed files with 7 additions and 5 deletions
|
@ -128,7 +128,7 @@ var dropdownSelector = (function() {
|
|||
function refreshDropdownSelection(selector, container) {
|
||||
container.find('.dropdown-option, .dropdown-group').removeClass('select');
|
||||
$.each(getCurrentData(container), function(i, selectedOption) {
|
||||
container.find(`.dropdown-option[data-value="${selectedOption.value}"][data-group="${selectedOption.group || ''}"]`)
|
||||
container.find(`.dropdown-option[data-value="${_.escape(selectedOption.value)}"][data-group="${selectedOption.group || ''}"]`)
|
||||
.addClass('select');
|
||||
});
|
||||
if (selector.data('select-by-group')) {
|
||||
|
@ -736,14 +736,16 @@ var dropdownSelector = (function() {
|
|||
var title = (data.params && data.params.tooltip) || $('<span>' + label + '</span>').text().trim();
|
||||
// Add new tag before search field
|
||||
var tag = $(`<div class="${tagAppearance} ${customClass}" style="${customStyle ? customStyle(data) : ''}" >
|
||||
<div class="tag-label"
|
||||
data-ds-tag-group="${data.group}"
|
||||
data-ds-tag-id="${data.value}">
|
||||
<div class="tag-label">
|
||||
</div>
|
||||
<i class="fas fa-times ${selector.data('config').singleSelect ? 'hidden' : ''}"></i>
|
||||
</div>`).insertBefore(container.find('.input-field .search-field'));
|
||||
|
||||
tag.find('.tag-label').attr('title', title);
|
||||
|
||||
tag.find('.tag-label')
|
||||
.attr('data-ds-tag-group', data.group)
|
||||
.attr('data-ds-tag-id', data.value)
|
||||
.attr('title', title);
|
||||
if (selector.data('config').labelHTML) {
|
||||
tag.find('.tag-label').html(label);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue