Skip to content

Commit

Permalink
Merge pull request #10 from vapor/percent-decode
Browse files Browse the repository at this point in the history
percent decode to foundation
  • Loading branch information
loganwright authored Mar 17, 2017
2 parents 2ea67f3 + 0a5d9b1 commit 8ee5bfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Branches/Branch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ extension Branch {
public func slugs(for path: [String]) -> Node {
var slugs: [String: Node] = [:]
slugIndexes.forEach { key, index in
guard let val = path[safe: index].flatMap({ $0.makeBytes().percentDecoded() }) else { return }
slugs[key] = Node.string(val.makeString())
guard let val = path[safe: index].flatMap({ $0.removingPercentEncoding }) else { return }
slugs[key] = Node.string(val)
}
return Node.object(slugs)
}
Expand Down

0 comments on commit 8ee5bfd

Please sign in to comment.