mirror of https://github.com/zulip/zulip.git
subs: Encode stream names before updating stream descriptions.
The API uses this endpoint /json/streams/<stream_name> to update stream information such as description, since the stream_name is part of the URI it should be encoded to escape unsafe characters. Fixes #1986.
This commit is contained in:
parent
82b814a1cd
commit
74baee93fa
|
@ -1091,6 +1091,8 @@ $(function () {
|
|||
|
||||
var $sub_row = $(e.target).closest('.subscription_row');
|
||||
var stream_name = $sub_row.find('.subscription_name').text();
|
||||
// Stream name might contain unsafe characters so we must encode it first.
|
||||
stream_name = encodeURIComponent(stream_name);
|
||||
var description = $sub_row.find('input[name="description"]').val();
|
||||
|
||||
$('#subscriptions-status').hide();
|
||||
|
|
Loading…
Reference in New Issue