From 0a419e51d0c8a85eb03e60c7870167fdacaa4c69 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Thu, 28 Mar 2013 11:04:13 -0400 Subject: [PATCH] Fix ui.set_count not finding streams that require url encoding in sidebar (imported from commit c363669806f56650c6aecb66f7208ea692bfd613) --- zephyr/static/js/ui.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zephyr/static/js/ui.js b/zephyr/static/js/ui.js index cb770f6ed7..d45959ddea 100644 --- a/zephyr/static/js/ui.js +++ b/zephyr/static/js/ui.js @@ -1011,11 +1011,12 @@ exports.get_count = function (type, name) { }; exports.set_count = function (type, name, count) { - var count_span = exports.get_filter_li(type, name).find('.count'); + var encoded = encodeURIComponent(name); + var count_span = exports.get_filter_li(type, encoded).find('.count'); var value_span = count_span.find('.value'); if (count === 0) { - return exports.clear_count(type, name); + return exports.clear_count(type, encoded); } count_span.show();