Remove brackets from `username_filters[]` URL
This commit is contained in:
parent
eef34eea80
commit
94917f47ed
|
@ -191,7 +191,7 @@ Ember.DiscourseLocation = Ember.Object.extend({
|
|||
if (Em.isEmpty(params) || Em.isEmpty(Object.keys(params))) {
|
||||
return "";
|
||||
} else {
|
||||
return "?" + $.param(params).replace(/%5B/g, "[").replace(/%5D/g, "]");
|
||||
return "?" + decodeURIComponent($.param(params, true));
|
||||
}
|
||||
}.property('queryParams'),
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ Discourse.TopicFromParamsRoute = Discourse.Route.extend({
|
|||
postStream.set('bestOf', Em.get(queryParams, 'filter') === 'best_of');
|
||||
|
||||
// Set any username filters on the postStream
|
||||
var userFilters = Em.get(queryParams, 'username_filters[]');
|
||||
var userFilters = Em.get(queryParams, 'username_filters') || Em.get(queryParams, 'username_filters[]');
|
||||
if (userFilters) {
|
||||
if (typeof userFilters === "string") { userFilters = [userFilters]; }
|
||||
userFilters.forEach(function (username) {
|
||||
|
|
Loading…
Reference in New Issue