mirror of
https://github.com/e1fueg0/intellij-gitea-plugin.git
synced 2024-10-27 20:34:04 +00:00
Encode query string to fix problems of searching for issues with a whitespace in it.
This commit is contained in:
parent
e5e3e84b23
commit
1f7fcd7d03
@ -30,6 +30,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
@ -260,7 +261,7 @@ class GiteaRepository extends BaseRepositoryImpl {
|
|||||||
|
|
||||||
StringBuilder qu = new StringBuilder();
|
StringBuilder qu = new StringBuilder();
|
||||||
if (query != null)
|
if (query != null)
|
||||||
qu.append("?q=").append(query);
|
qu.append("?q=").append(URLEncoder.encode(query, "UTF-8"));
|
||||||
if (withClosed)
|
if (withClosed)
|
||||||
qu.append("&state=closed");
|
qu.append("&state=closed");
|
||||||
qu.append("&page=");
|
qu.append("&page=");
|
||||||
|
Loading…
Reference in New Issue
Block a user