[dia/dia-0-97] Bug 602845 - '&' character disappears during SVG and Dia Shape export



commit 7dfd2f942510514e25c677db3f50d0178401d4b1
Author: Hans Breuer <hans breuer org>
Date:   Tue Nov 24 21:46:12 2009 +0100

    Bug 602845 - '&' character disappears during SVG and Dia Shape export
    
    Need to use xmlNexTextChild rather than xmlTextChild. The latter only translates to &lt; and &gt; but not &amp;.
    (cherry picked from commit 53b7d2474ce171bfdc841438067aac8df3a93c6c)

 lib/diasvgrenderer.c      |    4 ++--
 plug-ins/svg/render_svg.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/lib/diasvgrenderer.c b/lib/diasvgrenderer.c
index ff9b24d..fd10f13 100644
--- a/lib/diasvgrenderer.c
+++ b/lib/diasvgrenderer.c
@@ -668,8 +668,8 @@ draw_text_line(DiaRenderer *self, TextLine *text_line,
   gchar d_buf[DTOSTR_BUF_SIZE];
   DiaFont *font;
 
-  node = xmlNewChild(renderer->root, renderer->svg_name_space, (const xmlChar *)"text", 
-		     (xmlChar *) text_line_get_string(text_line));
+  node = xmlNewTextChild(renderer->root, renderer->svg_name_space, (const xmlChar *)"text", 
+		         (xmlChar *) text_line_get_string(text_line));
  
   saved_width = renderer->linewidth;
   renderer->linewidth = 0.001;
diff --git a/plug-ins/svg/render_svg.c b/plug-ins/svg/render_svg.c
index 8438e15..58148b1 100644
--- a/plug-ins/svg/render_svg.c
+++ b/plug-ins/svg/render_svg.c
@@ -487,8 +487,8 @@ draw_text (DiaRenderer *self, Text *text)
   for (i=0;i<text->numlines;i++) {
     TextLine *text_line = text->lines[i];
 
-    node_tspan = xmlNewChild(node_text, renderer->svg_name_space, (const xmlChar *)"tspan",
-                             (const xmlChar *)text_line_get_string(text_line));
+    node_tspan = xmlNewTextChild(node_text, renderer->svg_name_space, (const xmlChar *)"tspan",
+                                 (const xmlChar *)text_line_get_string(text_line));
     dia_svg_dtostr(d_buf, pos.x);
     xmlSetProp(node_tspan, (const xmlChar *)"x", (xmlChar *) d_buf);
     dia_svg_dtostr(d_buf, pos.y);



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