mirror of https://github.com/zulip/zulip.git
typeahead: Use text() instead of html() in set_value.
This particular codepath is never reached right now, because set_value is only called when `naturalSearch` is `true`, and the only instance of `naturalSearch` isn't for a `contenteditable` field. But we don't need to use `html()` here because it's displaying a plain string typeahead option.
This commit is contained in:
parent
099810e80f
commit
60018dfd12
|
@ -207,7 +207,7 @@ Typeahead.prototype = {
|
||||||
set_value() {
|
set_value() {
|
||||||
const val = this.$menu.find(".active").data("typeahead-value");
|
const val = this.$menu.find(".active").data("typeahead-value");
|
||||||
if (this.$element.is("[contenteditable]")) {
|
if (this.$element.is("[contenteditable]")) {
|
||||||
this.$element.html(val);
|
this.$element.text(val);
|
||||||
} else {
|
} else {
|
||||||
this.$element.val(val);
|
this.$element.val(val);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue