mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-22 20:48:59 +00:00
(search) Correct exception from misbehaving bots feeding invalid urls
This commit is contained in:
parent
3eac4dd57f
commit
7519b28e21
@ -86,8 +86,10 @@ public record SearchParameters(WebsiteUrl url,
|
||||
public String renderUrl() {
|
||||
|
||||
StringBuilder pathBuilder = new StringBuilder("/search?");
|
||||
pathBuilder.append("query=").append(URLEncoder.encode(query, StandardCharsets.UTF_8));
|
||||
|
||||
if (query != null) {
|
||||
pathBuilder.append("query=").append(URLEncoder.encode(query, StandardCharsets.UTF_8));
|
||||
}
|
||||
if (profile != SearchProfile.NO_FILTER) {
|
||||
pathBuilder.append("&profile=").append(URLEncoder.encode(profile.filterId, StandardCharsets.UTF_8));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user