--- C:/Documents and Settings/John.Marshall/Local Settings/Temp/xmp-encode.c-revBASE.svn002.tmp.c	Tue Jul 10 10:39:47 2007
+++ W:/gnu/src/svn/gimp/trunk/plug-ins/metadata/xmp-encode.c	Tue Jul 10 10:39:44 2007
@@ -66,7 +66,7 @@
     case XMP_TYPE_RATIONAL:
       g_string_append_printf (buffer, "  <%s:%s>%s</%s:%s>\n",
                               schema->prefix, property->name,
-                              value_array[0],
+                              g_markup_escape_text (value_array[0], -1),
                               schema->prefix, property->name);
       break;
 
@@ -78,7 +78,7 @@
                               schema->prefix, property->name);
       for (i = 0; value_array[i] != NULL; i++)
         g_string_append_printf (buffer, "    <rdf:li>%s</rdf:li>\n",
-                                value_array[i]);
+                                g_markup_escape_text (value_array[i], -1));
       g_string_append_printf (buffer, "   </rdf:Bag>\n  </%s:%s>\n",
                               schema->prefix, property->name);
       break;
@@ -91,7 +91,7 @@
                               schema->prefix, property->name);
       for (i = 0; value_array[i] != NULL; i++)
         g_string_append_printf (buffer, "    <rdf:li>%s</rdf:li>\n",
-                                value_array[i]);
+                                g_markup_escape_text (value_array[i], -1));
       g_string_append_printf (buffer, "   </rdf:Seq>\n  </%s:%s>\n",
                               schema->prefix, property->name);
       break;
@@ -102,7 +102,8 @@
       for (i = 0; value_array[i] != NULL; i += 2)
         g_string_append_printf (buffer,
                                 "    <rdf:li xml:lang='%s'>%s</rdf:li>\n",
-                                value_array[i], value_array[i + 1]);
+                                value_array[i],
+                                g_markup_escape_text (value_array[i + 1], -1));
       g_string_append_printf (buffer, "   </rdf:Alt>\n  </%s:%s>\n",
                               schema->prefix, property->name);
       break;
@@ -142,7 +143,7 @@
         for (i = 2; value_array[i] != NULL; i += 2)
           g_string_append_printf (buffer, "   <%s:%s>%s</%s:%s>\n",
                                   ns_prefix, value_array[i],
-                                  value_array[i + 1],
+                                  g_markup_escape_text (value_array[i + 1], -1),
                                   ns_prefix, value_array[i]);
       g_string_append_printf (buffer, "  </%s:%s>\n",
                               schema->prefix, property->name);
