Skip to content

Commit

Permalink
Use UriUtils to encode query params for NcbiExportPage.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ericenns committed Dec 16, 2021
1 parent 0d11bb2 commit 8fb6261
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import org.springframework.web.util.UriUtils;

import ca.corefacility.bioinformatics.irida.ria.integration.pages.AbstractPage;

Expand Down Expand Up @@ -52,7 +53,7 @@ public NcbiExportPage(WebDriver driver) {
public static NcbiExportPage goTo(WebDriver driver, Long projectId, Collection<Long> sampleIds) {

StringJoiner stringJoiner = new StringJoiner("&");
sampleIds.forEach(s -> stringJoiner.add("ids%5B%5D=" + s.toString()));
sampleIds.forEach(s -> stringJoiner.add(UriUtils.encodeQuery("ids[]=" + s.toString(), "UTF-8")));

String url = "projects/" + projectId + "/export/ncbi?" + stringJoiner.toString();
get(driver, url);
Expand Down

0 comments on commit 8fb6261

Please sign in to comment.