mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +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:
@@ -209,8 +209,8 @@ function delete_choice_row(e) {
|
||||
|
||||
function get_profile_field_info(id) {
|
||||
const info = {};
|
||||
info.row = $("tr.profile-field-row[data-profile-field-id='" + id + "']");
|
||||
info.form = $("tr.profile-field-form[data-profile-field-id='" + id + "']");
|
||||
info.row = $(`tr.profile-field-row[data-profile-field-id='${CSS.escape(id)}']`);
|
||||
info.form = $(`tr.profile-field-form[data-profile-field-id='${CSS.escape(id)}']`);
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user