Amazon links fail due to not escaping special characters

This forum is for reporting bugs in MediaMonkey for Windows 4. Note that version 4 is no longer actively maintained as it has been replaced by version 5.

Moderator: Gurus

diablod
Posts: 11
Joined: Fri Mar 10, 2006 2:34 am

Amazon links fail due to not escaping special characters

Post by diablod »

Amazon links from tracks with an ampersand & in the title fail to jump or link correctly to amazon.

Found on MM 3.0.6.1190 on Vista SP1 with Firefox 3.0.5 as my default browser.

Track title is "Delicious (Vission & Lorimer Klub Mix #2)"
I know...old house track. haha.
Click arrow link in the result pane on the right next to the title.
Link goes to amazon and fails to find track.

The link in firefox's address bar is:
http://www.amazon.com/s/ref=nb_ss_dmusi ... re%20Sugar

In the UI of amazon, the search field shows:
"Delicious (Vission "

Notice the space at the end. This matches having the next desired character being & from the title. However, since it isn't escaped, Amazon's web servers think the & is ending the field-keywords parameter being passed to them by MM. The spaces are being escaped by MediaMoney as %20 but the ampersands & and hashes # are not.

Fix:
Escape an & and # in any field keyword being passed with %26 for ampersand & and %23 for hash #. If both characters are escaped, the URL will be:
http://www.amazon.com/s/ref=nb_ss_dmusi ... re%20Sugar

and amazon correctly understand the who keyword set being passed and shows it in the amazon html UI search field.

Note: there may be more characters to escape. However, & and # has special meaning and are relatively easy fixes.
jiri
Posts: 5426
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Re: Amazon links fail due to not escaping special characters

Post by jiri »

Thanks, it will be fixed in the next release.

Jiri
Post Reply