Skip to content

Commit

Permalink
Merge pull request #31494 from FitseTLT/fix-tag-esc-character-issue
Browse files Browse the repository at this point in the history
Fix:30734 - tag esc character issue
  • Loading branch information
roryabraham authored Nov 21, 2023
2 parents db37e46 + 7de5d9f commit 5a59bdb
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -910,13 +910,18 @@ function getCategoryListSections(categories, recentlyUsedCategories, selectedOpt
* @returns {Array<Object>}
*/
function getTagsOptions(tags) {
return _.map(tags, (tag) => ({
text: tag.name,
keyForList: tag.name,
searchText: tag.name,
tooltipText: tag.name,
isDisabled: !tag.enabled,
}));
return _.map(tags, (tag) => {
// This is to remove unnecessary escaping backslash in tag name sent from backend.
const tagName = tag.name && tag.name.replace(/\\{1,2}:/g, ':');

return {
text: tagName,
keyForList: tagName,
searchText: tagName,
tooltipText: tagName,
isDisabled: !tag.enabled,
};
});
}

/**
Expand Down

0 comments on commit 5a59bdb

Please sign in to comment.