N°3835 Autocomplete security hardening

This commit is contained in:
Stephen Abello
2021-11-29 14:58:33 +01:00
parent fc2b00699e
commit 3df5febd3e
2 changed files with 3 additions and 3 deletions

View File

@@ -269,7 +269,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
if (item.obsolescence_flag == '1') {
val = val+' <span class="object-ref-icon text_decoration"><span class="fas fa-eye-slash object-obsolete fa-1x fa-fw"></span></span>';
}
let labelValue = $('<div/>').html(item.label).text().replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term+")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
let labelValue = item.label.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term+")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
val = val+labelValue;
if (item.additional_field != undefined) {
val = val+'<br><i>'+item.additional_field+'</i>';