[gnome-disk-utility/wip/kailueke/escape-mount-point: 2/2] Escape hyperlink text in mount point label




commit 433c626c411a810badccfdaf9fda9b2b59726919
Author: Kai Lüke <kailueke riseup net>
Date:   Mon Jun 28 23:22:09 2021 +0200

    Escape hyperlink text in mount point label
    
    Mount points with special characters broke the hyperlink assembling for
    the label.
    
    Escape the mount point string when assembling the label hyperlink.
    
    https://gitlab.gnome.org/GNOME/gnome-disk-utility/-/issues/216

 src/disks/gduwindow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/disks/gduwindow.c b/src/disks/gduwindow.c
index 12c3e477..aaaf4341 100644
--- a/src/disks/gduwindow.c
+++ b/src/disks/gduwindow.c
@@ -2542,7 +2542,7 @@ update_device_page_for_block (GduWindow          *window,
             }
           else
             {
-              s = g_strdup_printf ("<a href=\"file://%s\">%s</a>",
+              s = g_markup_printf_escaped ("<a href=\"file://%s\">%s</a>",
                                    mount_points[0], mount_points[0]);
             }
           /* Translators: Shown as in-use part of 'Contents'. The first %s is the mount point, e.g. 
/media/foobar */


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