diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index e728b0bdb7..1958b7d133 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -4144,7 +4144,7 @@ gtk_icon_info_load_symbolic_svg (GtkIconInfo *icon_info,
width = g_strdup_printf ("%d", icon_info->symbolic_width);
height = g_strdup_printf ("%d", icon_info->symbolic_height);
- escaped_file_data = g_markup_escape_text (file_data, file_len);
+ escaped_file_data = g_base64_encode ((guchar *) file_data, file_len);
g_free (file_data);
g_ascii_dtostr (alphastr, G_ASCII_DTOSTR_BUF_SIZE, CLAMP (alpha, 0, 1));
@@ -4169,7 +4169,7 @@ gtk_icon_info_load_symbolic_svg (GtkIconInfo *icon_info,
" fill: ", css_success, " !important;\n"
" }\n"
" \n"
- " \n"
+ " \n"
"",
NULL);
g_free (escaped_file_data);
diff --git a/gtk/tools/gdkpixbufutils.c b/gtk/tools/gdkpixbufutils.c
index b47ebf9df8..0ed23bd3dc 100644
--- a/gtk/tools/gdkpixbufutils.c
+++ b/gtk/tools/gdkpixbufutils.c
@@ -178,7 +178,7 @@ load_symbolic_svg (const char *file_data,
svg_height = g_strdup_printf ("%d", gdk_pixbuf_get_height (pixbuf));
g_object_unref (pixbuf);
- escaped_file_data = g_markup_escape_text (file_data, file_len);
+ escaped_file_data = g_base64_encode ((guchar *) file_data, file_len);
data = g_strconcat ("\n"
"",
NULL);
g_free (escaped_file_data);