Amazon links fail due to not escaping special characters

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Amazon links fail due to not escaping special characters

Re: Amazon links fail due to not escaping special characters

by jiri » Tue Jan 06, 2009 3:25 pm

Thanks, it will be fixed in the next release.

Jiri

Amazon links fail due to not escaping special characters

by diablod » Mon Jan 05, 2009 12:21 pm

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.

Top