mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
compose: HTML-escape errors from server for compose_error.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
4a3ad0da06
commit
c4b60acf9c
@@ -379,7 +379,7 @@ export function send_message(request = create_message_object()) {
|
||||
// If we're not local echo'ing messages, or if this message was not
|
||||
// locally echoed, show error in compose box
|
||||
if (!locally_echoed) {
|
||||
compose_error(response, $("#compose-textarea"));
|
||||
compose_error(_.escape(response), $("#compose-textarea"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1149,7 +1149,7 @@ export function initialize() {
|
||||
|
||||
function failure(error_msg) {
|
||||
clear_invites();
|
||||
compose_error(error_msg, $("#compose-textarea"));
|
||||
compose_error(_.escape(error_msg), $("#compose-textarea"));
|
||||
$(event.target).prop("disabled", true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user