[gimp/soc-2011-seamless-clone2] Bug 698426: ALL text disappears when changing font ...



commit e50f5d7cf585215c0b4fabfa72a3dd6cb843d2fb
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Sun Apr 21 17:47:01 2013 +0200

    Bug 698426: ALL text disappears when changing font ...
    
    of selected text in on-canvas editor
    
    It is necessary to escape font names containing '&'

 app/widgets/gimptextbuffer-serialize.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimptextbuffer-serialize.c b/app/widgets/gimptextbuffer-serialize.c
index c4dd85e..40f7fcf 100644
--- a/app/widgets/gimptextbuffer-serialize.c
+++ b/app/widgets/gimptextbuffer-serialize.c
@@ -85,8 +85,12 @@ open_tag (GimpTextBuffer *buffer,
     {
       if (attribute && attribute_value)
         {
+          gchar *escaped = g_markup_escape_text (attribute_value, -1);
+
           g_string_append_printf (string, "<%s %s=\"%s\">",
-                                  name, attribute, attribute_value);
+                                  name, attribute, escaped);
+
+          g_free (escaped);
           g_free (attribute_value);
         }
       else


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