]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sat, 4 Aug 2018 20:02:20 +0000 (16:02 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sat, 4 Aug 2018 20:02:20 +0000 (16:02 -0400)
coders/svg.c

index 08961408dda048675ef3c61bcd217220d74e788b..b47e093a754dec050f80642477015f3504abdbab 100644 (file)
@@ -1491,8 +1491,6 @@ static void SVGStartElement(void *context,const xmlChar *name,
           (void) FormatLocaleFile(svg_info->file,"class \"text\"\n");
           (void) FormatLocaleFile(svg_info->file,"translate %g,%g\n",
             svg_info->bounds.x,svg_info->bounds.y);
-          if (*svg_info->text != '\0')
-            StripString(svg_info->text);
           svg_info->center.x=svg_info->bounds.x;
           svg_info->center.y=svg_info->bounds.y;
           svg_info->bounds.x=0.0;
@@ -2708,6 +2706,7 @@ static void SVGEndElement(void *context,const xmlChar *name)
               char
                 *text;
 
+              SVGStripString(MagickTrue,svg_info->text);
               text=EscapeString(svg_info->text,'\'');
               (void) FormatLocaleFile(svg_info->file,"text 0,0 \"%s\"\n",text);
               text=DestroyString(text);