Skip to content

Commit 1c11db8

Browse files
authored
Merge pull request appwrite#1081 from appwrite/fix-url-encoding
fix: encode + in parametersToQueryString
2 parents 38de4b9 + 634688d commit 1c11db8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/apple/Sources/Client.swift.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ open class Client {
215215

216216
return output.addingPercentEncoding(
217217
withAllowedCharacters: .urlHostAllowed
218-
) ?? ""
218+
)?.replacingOccurrences(of: "+", with: "%2B") ?? "" // since urlHostAllowed doesn't include +
219219
}
220220

221221
///

templates/swift/Sources/Client.swift.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ open class Client {
192192

193193
return output.addingPercentEncoding(
194194
withAllowedCharacters: .urlHostAllowed
195-
) ?? ""
195+
)?.replacingOccurrences(of: "+", with: "%2B") ?? "" // since urlHostAllowed doesn't include +
196196
}
197197

198198
///

0 commit comments

Comments
 (0)