Fix encoding issue

This commit is contained in:
Bob Sun 2017-04-26 23:01:42 -07:00
parent d94c7626a6
commit b3e7ed25cd
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
2 changed files with 7 additions and 5 deletions

View file

@ -65,8 +65,9 @@ class AddPasswordTableViewController: PasswordEditorTableViewController {
} else {
plainText = "\(cellContents["password"]!)"
}
let name = URL(string: cellContents["name"]!)!.lastPathComponent
let url = URL(string: cellContents["name"]!)!.appendingPathExtension("gpg")
let encodedName = cellContents["name"]!.stringByAddingPercentEncodingForRFC3986()!
let name = URL(string: encodedName)!.lastPathComponent
let url = URL(string: encodedName)!.appendingPathExtension("gpg")
password = Password(name: name, url: url, plainText: plainText)
}
}