Use new urlQueryString method from RSWeb.

This commit is contained in:
Brent Simmons 2018-01-14 09:36:24 -08:00
parent f430d6a095
commit 8df34bfcda
1 changed files with 3 additions and 2 deletions

View File

@ -61,10 +61,11 @@ final class SendToMicroBlogCommand: SendToCommand {
s = link
}
guard let encodedString = s.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) else {
let urlQueryDictionary = ["text": s]
guard let urlQueryString = urlQueryDictionary.urlQueryString() else {
return
}
guard let url = URL(string: "microblog://post?text=" + encodedString) else {
guard let url = URL(string: "microblog://post?" + urlQueryString) else {
return
}