mirror of
https://github.com/zulip/zulip.git
synced 2025-11-18 12:54:58 +00:00
web: Add missing CSS selector escaping.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
b4f02a336d
commit
61bc10ca01
@@ -8,7 +8,12 @@ exports.mock_banners = () => {
|
||||
// zjquery doesn't support `remove`, which is used when clearing the compose box.
|
||||
// TODO: improve how we test this so that we don't have to mock things like this.
|
||||
for (const classname of Object.values(compose_banner.CLASSNAMES)) {
|
||||
$(`#compose_banners .${classname.replaceAll(" ", ".")}`).remove = () => {};
|
||||
$(
|
||||
`#compose_banners .${classname
|
||||
.split(" ")
|
||||
.map((classname) => CSS.escape(classname))
|
||||
.join(".")}`,
|
||||
).remove = () => {};
|
||||
}
|
||||
$("#compose_banners .warning").remove = () => {};
|
||||
$("#compose_banners .error").remove = () => {};
|
||||
|
||||
Reference in New Issue
Block a user