metabrainz/acousticbrainz-server — pull request #28 by JonnyJD (2014-11-21 15:45:21+00:00)
Title: quote artist/title for Tomahawk embedding

Firefox does a lot of guessing already to quote/encode urls automatically, but it does fail at some places.

For "Nick Cave & The Bad Seeds - The Weeping Song" the artist gets cut off as just "Nick cave" because of that:
http://acousticbrainz.org/b598c73a-6bd3-4e0c-93b1-9bc988d01e64

This should fix this.

For this to work we also actively (rather than automatically as before) encode to UTF-8.
This is probably correct, but not yet fully working because of:
https://bugs.tomahawk-player.org/browse/THK-92
The tomahawk seems to be sending UTF-8 pages, but doesn't seem to specify an encoding in HTML or HTTP headers. (This might work on some setups when UTF-8 is chosen by default in the client)

This is an example that fails to display correctly with and without quoting on our end:
http://acousticbrainz.org/cc8ddf86-d389-4e1f-a045-3ee85be1b81b