Bug 269455

Summary: musicbrainz request fails in the track title contains a '!' character
Product: amarok Reporter: andreaswuest
Component: Metadata Editing and ReadingAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: 123kash
Priority: NOR    
Version: 2.4.0   
Target Milestone: 2.4.1   
Platform: Ubuntu Packages   
OS: Linux   
Latest Commit: Version Fixed In: 2.4.1

Description andreaswuest 2011-03-26 11:33:03 UTC
Version:           2.4.0 (using KDE 4.5.1) 
OS:                Linux

hi,

the musicbrainz request fails if the track title contains a '!'. i guess this
also happens with other elements of the track and with other characters. 

tested track: 
http://en.wikipedia.org/wiki/Chop_Suey!_%28song%29

on the console i can see the request:
amarok:   [MusicBrainzFinder] Request sent:  "http://musicbrainz.org:80/ws/1/track/?type=xml&limit=10&query=dur:(211000) track:(Chop Suey!) artist:(System of a Down) release:(Toxicity)" 

the request also fails if i paste the url in the browser. 
> Search server could not complete query: Bad request

masking the '!' with a backslash works in with the url in the  browser. so i guess it will also work for amarok in the code. 
working url:
http://musicbrainz.org/ws/1/track/?type=xml&limit=10&query=dur:%28211000%29%20track:%28Chop%20Suey\!%29%20artist:%28System%20of%20a%20Down%29%20release:%28Toxicity%29

cheers,
andy

Reproducible: Always
Comment 1 Sergey Ivanov 2011-03-28 15:35:13 UTC
Git commit 402623fcd2d29c2d7c1b05ad9cbf69ba079b652d by Sergey Ivanov.
Committed on 28/03/2011 at 15:37.
Pushed by ivanov into branch 'master'.

Screen escape characters in MusicBrainz request string.
BUG: 269455

M  +1    -0    ChangeLog     
M  +7    -3    src/musicbrainz/MusicBrainzFinder.cpp     

http://commits.kde.org/amarok/402623fcd2d29c2d7c1b05ad9cbf69ba079b652d