mirror of https://github.com/keeweb/keeweb.git
escaping html in dropdowns
This commit is contained in:
parent
cbb9a29c8d
commit
38c3a46395
|
@ -135,7 +135,7 @@ class ListSearchView extends View {
|
|||
|
||||
setLocale() {
|
||||
this.sortOptions.forEach(opt => {
|
||||
opt.text = opt.loc();
|
||||
opt.html = opt.loc();
|
||||
});
|
||||
const entryDesc = Features.isMobile
|
||||
? ''
|
||||
|
@ -145,7 +145,7 @@ class ListSearchView extends View {
|
|||
Shortcuts.altShortcutSymbol(true) +
|
||||
'N)</span>';
|
||||
this.createOptions = [
|
||||
{ value: 'entry', icon: 'key', text: StringFormat.capFirst(Locale.entry) + entryDesc },
|
||||
{ value: 'entry', icon: 'key', html: StringFormat.capFirst(Locale.entry) + entryDesc },
|
||||
{ value: 'group', icon: 'folder', text: StringFormat.capFirst(Locale.group) }
|
||||
];
|
||||
if (this.el) {
|
||||
|
|
|
@ -2,7 +2,13 @@
|
|||
{{#each options as |option|}}
|
||||
<div class="dropdown__item {{#if option.active}}dropdown__item--active{{/if}}" data-value="{{option.value}}">
|
||||
<i class="fa fa-{{option.icon}} dropdown__item-icon"></i>
|
||||
<span class="dropdown__item-text">{{{option.text}}}</span>
|
||||
<span class="dropdown__item-text">
|
||||
{{~#if option.text~}}
|
||||
{{option.text}}
|
||||
{{~else~}}
|
||||
{{{option.html}}}
|
||||
{{~/if~}}
|
||||
</span>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue