Merge pull request #2478 from kielgillard/mac-release
macOS: Encode the + in Feedly collection URIs. Fixes #2443.
This commit is contained in:
commit
bd38c1219c
@ -48,10 +48,15 @@ final class FeedlyAPICaller {
|
|||||||
|
|
||||||
private let transport: Transport
|
private let transport: Transport
|
||||||
private let baseUrlComponents: URLComponents
|
private let baseUrlComponents: URLComponents
|
||||||
|
private let uriComponentAllowed: CharacterSet
|
||||||
|
|
||||||
init(transport: Transport, api: API) {
|
init(transport: Transport, api: API) {
|
||||||
self.transport = transport
|
self.transport = transport
|
||||||
self.baseUrlComponents = api.baseUrlComponents
|
self.baseUrlComponents = api.baseUrlComponents
|
||||||
|
|
||||||
|
var urlHostAllowed = CharacterSet.urlHostAllowed
|
||||||
|
urlHostAllowed.remove("+")
|
||||||
|
uriComponentAllowed = urlHostAllowed
|
||||||
}
|
}
|
||||||
|
|
||||||
weak var delegate: FeedlyAPICallerDelegate?
|
weak var delegate: FeedlyAPICallerDelegate?
|
||||||
@ -272,7 +277,7 @@ final class FeedlyAPICaller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func encodeForURLPath(_ pathComponent: String) -> String? {
|
private func encodeForURLPath(_ pathComponent: String) -> String? {
|
||||||
return pathComponent.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed)
|
return pathComponent.addingPercentEncoding(withAllowedCharacters: uriComponentAllowed)
|
||||||
}
|
}
|
||||||
|
|
||||||
func deleteCollection(with id: String, completion: @escaping (Result<Void, Error>) -> ()) {
|
func deleteCollection(with id: String, completion: @escaping (Result<Void, Error>) -> ()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user