diff --git a/templates/feed/feed_js.html b/templates/feed/feed_js.html index 904f6e4..8abc8a7 100644 --- a/templates/feed/feed_js.html +++ b/templates/feed/feed_js.html @@ -9,7 +9,9 @@ var vars = query.split("&"); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split("="); - queryParams[pair[0]] = decodeURIComponent(pair[1]); + var key = decodeURIComponent(pair[0]); + var value = decodeURIComponent(pair[1].replace(/\+/g, ' ')); + queryParams[key] = value; } return queryParams; } diff --git a/templates/problem/left-sidebar.html b/templates/problem/left-sidebar.html index 45074ac..2b94f68 100644 --- a/templates/problem/left-sidebar.html +++ b/templates/problem/left-sidebar.html @@ -1,7 +1,14 @@ {% if not show_contest_mode %} + {% set query_string = request.GET.urlencode() %} + {% set problem_feed_url = url('problem_feed') %} + {% set problem_list_url = url('problem_list') %} + {% if search_query %} + {% set problem_feed_url = problem_feed_url + '?' + query_string %} + {% set problem_list_url = problem_list_url + '?' + query_string %} + {% endif %}