[banshee] SmartPlaylists: Fix queries with { and } (bgo#641674)



commit 94a3fa82c016f9f4177fdf873d3cd40f1b90483a
Author: Frank Ziegler <funtastix googlemail com>
Date:   Wed Feb 9 16:34:31 2011 +0700

    SmartPlaylists: Fix queries with { and } (bgo#641674)
    
    Signed-off-by: Gabriel Burt <gabriel burt gmail com>

 .../Banshee.SmartPlaylist/SmartPlaylistSource.cs   |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs b/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
index 085166d..686974a 100644
--- a/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
+++ b/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
@@ -114,6 +114,8 @@ namespace Banshee.SmartPlaylist
                 relevant_fields.Clear ();
                 if (condition != null) {
                     condition_sql = condition.ToSql (BansheeQuery.FieldSet);
+                    //until bug in DB layer is fixed, escape String.Format chars
+                    condition_sql = condition_sql.Replace ("{", "{{").Replace ("}", "}}");
                     condition_xml = condition.ToXml (BansheeQuery.FieldSet);
 
                     foreach (QueryTermNode term in condition.GetTerms ()) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]