Skip to content

Commit 01a55bc

Browse files
committed
add encodeURLQueryComponent()
1 parent c73364b commit 01a55bc

File tree

1 file changed

+1
-1
lines changed
  • reasoning/src/commonMain/kotlin/com/xebia/functional/xef/reasoning/wikipedia

1 file changed

+1
-1
lines changed

reasoning/src/commonMain/kotlin/com/xebia/functional/xef/reasoning/wikipedia/WikipediaClient.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class WikipediaClient : AutoCloseable, AutoClose by autoClose() {
6969
suspend fun search(searchData: SearchData): SearchResult {
7070
return http
7171
.get(
72-
"https://en.wikipedia.org/w/api.php?format=json&action=query&list=search&srsearch=${searchData.search}"
72+
"https://en.wikipedia.org/w/api.php?format=json&action=query&list=search&srsearch=${searchData.search.encodeURLQueryComponent()}"
7373
) {
7474
contentType(ContentType.Application.Json)
7575
}

0 commit comments

Comments
 (0)