defunkt/hub — pull request #331 by aaronj1335 (2013-05-20 20:59:08+00:00)
Title: escape branch name as uri component in hub browse

if your branch name contains some characters that are significant to
uri's, then `hub browse` sends you to a 404 page. this change uses
`CGI.escape` to properly encode that when constructing the URL.

an example of where this is a problem is if you use topic branches named
by issues stored in an issue tracker, i.e. `fix-something-#123`
indicating what you're working on and the corresponding issue number.

i don't know anything about ruby, but it seems like there's a better way to
do this (adding a `branch.url_name` property [here](https://github.com/defunkt/hub/blob/master/lib/hub/context.rb#L306)?), so please let me
know if you'd prefer i implement something like that.