-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed query filter for questions with no accepted answer, when applie…
…d through the filter drawer
- Loading branch information
Showing
2 changed files
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,6 +189,8 @@ public String applyFilter(@RequestParam(required = false) String sortby, | |
if (!StringUtils.isBlank(typeFilter)) { | ||
HttpUtils.setRawCookie("questions-type-filter", typeFilter, | ||
req, res, "Strict", (int) TimeUnit.DAYS.toSeconds(365)); | ||
} else { | ||
HttpUtils.removeStateParam("questions-type-filter", req, res); | ||
} | ||
savePagerToCookie(req, res, p); | ||
HttpUtils.setRawCookie("questions-view-compact", compactViewEnabled, | ||
|
@@ -451,7 +453,7 @@ private String getQueryWithPossibleExtension(String query, HttpServletRequest re | |
queryExt = StringUtils.trimToEmpty(HttpUtils.getCookieValue(req, "questions-type-filter")); | ||
} | ||
if (!queryExt.isBlank()) { | ||
return query.equals("*") ? queryExt : query + " AND (" + queryExt + ")"; | ||
return query.equals("*") ? queryExt : query + " AND (" + Utils.urlDecode(queryExt) + ")"; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
albogdano
Author
Member
|
||
} | ||
return query; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@albogdano This urlDecoding should be done in both cases, not only in the latter case. So replace by:
queryExt = Utils.urlDecode(queryExt); return query.equals("*") ? queryExt : query + " AND (" + queryExt + ")";