mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
js: Escape strings interpolated into CSS selectors with CSS.escape.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -23,7 +23,7 @@ class BuddyListConf {
|
||||
get_li_from_key(opts) {
|
||||
const user_id = opts.key;
|
||||
const container = $(this.container_sel);
|
||||
return container.find(this.item_sel + "[data-user-id='" + user_id + "']");
|
||||
return container.find(`${this.item_sel}[data-user-id='${CSS.escape(user_id)}']`);
|
||||
}
|
||||
|
||||
get_key_from_li(opts) {
|
||||
|
||||
Reference in New Issue
Block a user