[glade] GladePreviewer: Fixed bug previewing templates.



commit 0914740fd53b1774727e160e41c91169558786c9
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Wed May 7 15:37:01 2014 -0300

    GladePreviewer: Fixed bug previewing templates.
    
    XML text data was not escaped when generating the template XML.

 gladeui/glade-preview-template.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gladeui/glade-preview-template.c b/gladeui/glade-preview-template.c
index 48ee9d4..847150a 100644
--- a/gladeui/glade-preview-template.c
+++ b/gladeui/glade-preview-template.c
@@ -203,8 +203,12 @@ text (GMarkupParseContext *context,
       gpointer             user_data,
       GError             **error)
 {
+  gchar *escaped_text = g_markup_escape_text (text, text_len);
   ParseData *state = user_data;
-  g_string_append_len (state->xml, text, text_len);
+
+  g_string_append_len (state->xml, escaped_text, -1);
+
+  g_free (escaped_text);
 }
 
 static void


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