[gnome-music/wip/jfelder/playlist-name-escape: 2/2] grltrackerplaylists: Escape playlist title when renamed




commit f96892bd032825677ad8a1246bd70eada771788c
Author: Jean Felder <jfelder src gnome org>
Date:   Wed Feb 24 20:02:50 2021 +0100

    grltrackerplaylists: Escape playlist title when renamed
    
    This prevents an error if the new playlist title contains a quotation
    mark.
    
    Closes: https://gitlab.gnome.org/GNOME/gnome-music/-/issues/447

 gnomemusic/grilowrappers/grltrackerplaylists.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnomemusic/grilowrappers/grltrackerplaylists.py b/gnomemusic/grilowrappers/grltrackerplaylists.py
index bcdc34bb8..d348597c5 100644
--- a/gnomemusic/grilowrappers/grltrackerplaylists.py
+++ b/gnomemusic/grilowrappers/grltrackerplaylists.py
@@ -481,7 +481,7 @@ class Playlist(GObject.GObject):
             )
         }
         """.replace("\n", " ").strip() % {
-            'title': new_name,
+            'title': Tracker.sparql_escape_string(new_name),
             'playlist_id': self.props.pl_id
         }
 


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