Issue Details (XML | Word | Printable)

Key: MBS-4058
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Oliver Charles
Reporter: thekiefs
Votes: 1
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
MusicBrainz Server

Tags with "/" not loading

Created: 24/Dec/11 04:10 AM   Updated: 06/Aug/12 09:58 AM  Due: 11/Jun/13   Resolved: 06/Aug/12 09:58 AM
Component/s: Data display
Affects Version/s: None
Fix Version/s: Bug fixes, 2012-08-06

Environment: All environments
Issue Links:
Relates
 


 Description  « Hide

Please see http://musicbrainz.org/user/thekiefs/tags and click on "hip-hop/rap."

For me, I am simply redirected to the same page and not the display of the release groups I have tagged with "hip-hop/rap". This only occurs with tags including a forward slash.



Sort Order: Ascending order - Click to sort in descending order
Pavan Chander added a comment - 27/Dec/11 11:24 PM

I can't think of a way to solve this and keep urls such as http://musicbrainz.org/tag/rock/artist.

Perhaps we should be blocking tags with '/' in them.


Oliver Charles added a comment - 27/Dec/11 11:27 PM - edited

URI escape "rock/artist" into "rock%2Fartist" (don't worry about 'breaking" "tag/rock/artist", because it was never right in the first place).


nikki added a comment - 08/Jan/12 12:44 AM

URI escape doesn't seem to help. http://beta.musicbrainz.org/tag/hip-hop%2Frap just loads the tags for "hip-hop".


Ian McEwen added a comment - 07/Jun/12 05:03 AM

URI-escaping doesn't help, at present, because Catalyst's argument capturing doesn't know the difference between / and %2F, as far as I know. Certainly at present it doesn't work, there may be an incantation that does make it differentiate.



Ian McEwen added a comment - 13/Jun/12 08:32 PM

I think the fix for this is to disallow / in tags (and editor names), and probably bulk-convert them to something else. We could be Mac-like and make ':' display as a /, and thereby disallow colons instead, if we really want to keep slashes.


Elliot Chance added a comment - 28/Jun/12 01:50 PM

I vote for keeping the slashes. There are several reasons to allow '/' as a valid character - for example many people that use it for genres/styles in a variety of cases.

If I try and access a tag from my profile page with a slash I simply get my profile page. The only way i've found around this is to manually double-escape the '/' by using %252F instead of %2F. Perhaps just make that change to the links in MBz then you don't have to mess with URIs?


patate12 added a comment - 30/Jun/12 07:10 PM

Is this a new bug (regression) ?
IIRC, this old tag of mine used to work but maybe I'm wrong fix 秋元裕子 http://musicbrainz.org/edit/14273514 (incomplet :/ ends with slash leads to different page as error).


Ian McEwen added a comment - 30/Jun/12 07:57 PM

After a bit of local testing I can confirm that replacing '/' by '%252F' does work, though no number of 'url_escape' in templates seems to do the same. Also works for editors.


Ian McEwen added a comment - 05/Jul/12 05:00 AM

Most of this is pretty easy to fix – wrapping replace(<whatever>, '/', '%252F') in templates, or <whatever> ~= s/\//%252F/rg in perl. There's some lurking issue about how catalyst urlencodes and urldecodes things as it forwards and redirects that means logins sometimes don't work or redirect to the wrong place; I may put up a codereview only for the first and open a new bug for the second.


patate12 added a comment - 06/Jul/12 08:09 AM

Ian, thanks for this work-around ! I'll try to remember to add this 25 stuff...


Oliver Charles added a comment - 16/Jul/12 12:43 PM

This is in review at http://codereview.musicbrainz.org/r/2062/ and available for testing on http://test.musicbrainz.org/