[banshee] AmazonMp3.Store: Escape search queries properly
- From: Gabriel Burt <gburt src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [banshee] AmazonMp3.Store: Escape search queries properly
 
- Date: Mon, 14 Mar 2011 21:02:43 +0000 (UTC)
 
commit 3aa676d8388b9f085d0c293c4d06dd88603c8f93
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Mon Mar 14 16:01:24 2011 -0500
    AmazonMp3.Store: Escape search queries properly
    
    Can now search for "tilly & the wall" where before that would end up
    searching Amazon just for "tilly".
 .../Banshee.AmazonMp3.Store/StoreView.cs           |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreView.cs b/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreView.cs
index ddf9b9f..20a5660 100644
--- a/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreView.cs
+++ b/src/Extensions/Banshee.AmazonMp3.Store/Banshee.AmazonMp3.Store/StoreView.cs
@@ -147,6 +147,12 @@ namespace Banshee.AmazonMp3.Store
 
         public override void GoSearch (string query)
         {
+            // Two escapes needed because on the redirect.c server it is put into
+            // a URI, which is escaped and passed as an argument to Amazon's own
+            // redirect server (so we can inject the affiliate code).
+            // Test search: tilly & the wall
+            query = System.Uri.EscapeDataString (query);
+            query = System.Uri.EscapeDataString (query);
             LoadUri (new Uri (GetActionUrl ("search/" + query)).AbsoluteUri);
         }
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]