Can't view files with poundsign/hashsign/octothorpe in filename (BB-744)

sproaticus avatarsproaticus created an issue

There's a file in my repository that has a pound sign (hash sign, octothorpe, etc.) in the file name. When you try to view the source in the bitbucket web interface, you get a 404 error, because the pound sign is not URL encoded; instead, the URL looks like it has an HTML fragment identifier.

Here's the URL that I get:

http://bitbucket.org/sproaticus/chordpro/src/tip/sketch/filename#poundsign.txt

Here's the URL that I expected (and shows the correct source BTW):

http://bitbucket.org/sproaticus/chordpro/src/tip/sketch/filename%23poundsign.txt
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.