Skip to content

Commit

Permalink
Fix: properly encode language names containing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dabico committed Mar 29, 2024
1 parent bd0e5b9 commit 3d6f610
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public GitHubRestConnector(
@SuppressWarnings("ConstantConditions")
public JsonObject searchRepositories(String language, Range<Date> dateRange, Integer page) {
Map<String, String> query = ImmutableMap.<String, String>builder()
.put("language", URLEncoder.encode(language, StandardCharsets.UTF_8))
.put("language", URLEncoder.encode("\"" + language + "\"", StandardCharsets.UTF_8))
.put("pushed", dateRangePrinter.print(dateRange))
.put("stars", String.format(">=%d", minimumStars))
.put("fork", "true")
Expand Down

0 comments on commit 3d6f610

Please sign in to comment.