js: Escape strings interpolated into CSS selectors with CSS.escape.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-02-03 14:23:32 -08:00
parent 9fc1adce60
commit aa650a4c88
75 changed files with 309 additions and 246 deletions

View File

@@ -190,7 +190,7 @@ function in_browser_notify(message, title, content, raw_operators, opts) {
})
.show();
$(".notification[data-message-id='" + message.id + "']")
$(`.notification[data-message-id='${CSS.escape(message.id)}']`)
.expectOne()
.data("narrow", {
raw_operators,