[libgdata] documents: Fix attribute escaping for GDataDocumentsEntry subclasses
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] documents: Fix attribute escaping for GDataDocumentsEntry subclasses
- Date: Thu, 2 Dec 2010 18:08:28 +0000 (UTC)
commit a14db789764bd49a83d9a91d3682217a6dd492f2
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Dec 2 16:48:33 2010 +0000
documents: Fix attribute escaping for GDataDocumentsEntry subclasses
No test cases can be added, as no public API is affected by the escaping.
Helps: bgo#631033
gdata/services/documents/gdata-documents-folder.c | 2 +-
.../documents/gdata-documents-presentation.c | 3 ++-
.../documents/gdata-documents-spreadsheet.c | 3 ++-
gdata/services/documents/gdata-documents-text.c | 3 ++-
4 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gdata/services/documents/gdata-documents-folder.c b/gdata/services/documents/gdata-documents-folder.c
index ec163aa..ce38c18 100644
--- a/gdata/services/documents/gdata-documents-folder.c
+++ b/gdata/services/documents/gdata-documents-folder.c
@@ -73,7 +73,7 @@ get_xml (GDataParsable *parsable, GString *xml_string)
document_id = gdata_documents_entry_get_document_id (GDATA_DOCUMENTS_ENTRY (parsable));
if (document_id != NULL)
- g_string_append_printf (xml_string, "<gd:resourceId>folder:%s</gd:resourceId>", document_id);
+ gdata_parser_string_append_escaped (xml_string, "<gd:resourceId>folder:", document_id, "</gd:resourceId>");
}
/**
diff --git a/gdata/services/documents/gdata-documents-presentation.c b/gdata/services/documents/gdata-documents-presentation.c
index 491bff6..bf14e2c 100644
--- a/gdata/services/documents/gdata-documents-presentation.c
+++ b/gdata/services/documents/gdata-documents-presentation.c
@@ -36,6 +36,7 @@
#include <glib.h>
#include "gdata-documents-presentation.h"
+#include "gdata-parser.h"
static void get_xml (GDataParsable *parsable, GString *xml_string);
@@ -67,7 +68,7 @@ get_xml (GDataParsable *parsable, GString *xml_string)
document_id = gdata_documents_entry_get_document_id (GDATA_DOCUMENTS_ENTRY (parsable));
if (document_id != NULL)
- g_string_append_printf (xml_string, "<gd:resourceId>presentation:%s</gd:resourceId>", document_id);
+ gdata_parser_string_append_escaped (xml_string, "<gd:resourceId>presentation:", document_id, "</gd:resourceId>");
}
/**
diff --git a/gdata/services/documents/gdata-documents-spreadsheet.c b/gdata/services/documents/gdata-documents-spreadsheet.c
index 4fcbdbe..dac0c30 100644
--- a/gdata/services/documents/gdata-documents-spreadsheet.c
+++ b/gdata/services/documents/gdata-documents-spreadsheet.c
@@ -39,6 +39,7 @@
#include <string.h>
#include "gdata-documents-spreadsheet.h"
+#include "gdata-parser.h"
#include "gdata-private.h"
static void get_xml (GDataParsable *parsable, GString *xml_string);
@@ -71,7 +72,7 @@ get_xml (GDataParsable *parsable, GString *xml_string)
document_id = gdata_documents_entry_get_document_id (GDATA_DOCUMENTS_ENTRY (parsable));
if (document_id != NULL)
- g_string_append_printf (xml_string, "<gd:resourceId>spreadsheet:%s</gd:resourceId>", document_id);
+ gdata_parser_string_append_escaped (xml_string, "<gd:resourceId>spreadsheet:", document_id, "</gd:resourceId>");
}
/**
diff --git a/gdata/services/documents/gdata-documents-text.c b/gdata/services/documents/gdata-documents-text.c
index 4292360..1e4ed3f 100644
--- a/gdata/services/documents/gdata-documents-text.c
+++ b/gdata/services/documents/gdata-documents-text.c
@@ -36,6 +36,7 @@
#include <glib.h>
#include "gdata-documents-text.h"
+#include "gdata-parser.h"
static void get_xml (GDataParsable *parsable, GString *xml_string);
@@ -67,7 +68,7 @@ get_xml (GDataParsable *parsable, GString *xml_string)
document_id = gdata_documents_entry_get_document_id (GDATA_DOCUMENTS_ENTRY (parsable));
if (document_id != NULL)
- g_string_append_printf (xml_string, "<gd:resourceId>document:%s</gd:resourceId>", document_id);
+ gdata_parser_string_append_escaped (xml_string, "<gd:resourceId>document:", document_id, "</gd:resourceId>");
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]