Merge pull request #8152 from artoscinote/ma_SCI_11454

Fix handling of '&' in quick search and tags [SCI-11454][SCI-11460]
This commit is contained in:
Martin Artnik 2025-01-15 15:49:18 +01:00 committed by GitHub
commit e4ea3b61e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -104,6 +104,7 @@
dropdownSelector.init($(myModuleTagsSelector), {
closeOnSelect: true,
tagClass: 'my-module-white-tags',
labelHTML: true,
tagStyle: (data) => {
return `background: ${data.params.color}`;
},
@ -143,13 +144,14 @@
} else if (lastTag.length > 0) {
newTag = {
tag: {
name: lastTag.find('.tag-label').html(),
name: lastTag.find('.tag-label').text(),
project_id: selectElement.data('project-id'),
color: null
},
my_module_id: selectElement.data('module-id'),
simple_creation: true
};
$.post(selectElement.data('tags-create-url'), newTag, function(result) {
dropdownSelector.removeValue(myModuleTagsSelector, 0, '', true);
dropdownSelector.addValue(myModuleTagsSelector, {

View file

@ -328,7 +328,7 @@ export default {
return;
}
window.open(`${this.searchUrl}?q=${this.searchQuery}&teams[]=${this.currentTeam}&include_archived=true`, '_self');
window.open(`${this.searchUrl}?q=${encodeURIComponent(this.searchQuery)}&teams[]=${this.currentTeam}&include_archived=true`, '_self');
},
focusHistoryItem(event) {
if (this.focusedHistoryItem === null && (event.key === 'ArrowDown' || event.key === 'ArrowUp')) {