mirror of https://github.com/zulip/zulip.git
Remove unescaped use of stream name in subscriptions page.
This was causing issues with our ability to unsubscribe from streams with " in their names. The solution here is a bit hacky, since it depends on the JavaScript being fairly aware of the layout of the DOM, which is not great. But it works. This fixes Trac #328. (imported from commit a1b6c8e1f3a9daacdc48920a195717aa89b3a9a9)
This commit is contained in:
parent
858d638960
commit
7de057dcb0
|
@ -8,8 +8,7 @@
|
|||
</td>
|
||||
<td class="span2">
|
||||
<button class="btn btn-block" type="button" name="subscription"
|
||||
onclick="subs.unsubscribe('{{subscription}}');"
|
||||
value="{{subscription}}">Unsubscribe</button>
|
||||
onclick="subs.unsubscribe_button_click(event);">Unsubscribe</button>
|
||||
</td>
|
||||
</tr>
|
||||
{{/with}}
|
||||
|
|
|
@ -229,7 +229,8 @@ function ajaxSubscribe(stream) {
|
|||
});
|
||||
}
|
||||
|
||||
exports.unsubscribe = function (stream) {
|
||||
exports.unsubscribe_button_click = function (e) {
|
||||
var stream = $(e.target).parent().prev().find('.subscription_name').text();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/json/subscriptions/remove",
|
||||
|
|
Loading…
Reference in New Issue