[gnome-music] query: Use double quotes for url in get_song_with_url



commit aa05e7ce1ce376e410739ccb56fbac3b2aee5ca2
Author: Arnel A. Borja <arnelborja src gnome org>
Date:   Mon Mar 31 01:07:36 2014 +0800

    query: Use double quotes for url in get_song_with_url
    
    Single quotes are not escaped in URIs, which causes syntax errors in the query if
    the URI has single quotes. Use double quotes instead.

 gnomemusic/query.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/query.py b/gnomemusic/query.py
index 7b7227e..fc8b8f3 100644
--- a/gnomemusic/query.py
+++ b/gnomemusic/query.py
@@ -290,7 +290,7 @@ class Query():
     WHERE {
         ?song a nmm:MusicPiece .
         FILTER (
-            nie:url(?song) = '%(url)s'
+            nie:url(?song) = "%(url)s"
         )
     }
     '''.replace('\n', ' ').strip() % {'url': url}


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